取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
选择语言 隐藏翻译栏
查看原发布的话题

与增强日志对话

hogi
Level XII

增强日志知道哪个命令发送到哪个数据表,并用不同的颜色指示源和输出数据表和报告。图标可用于将相应的窗口置于最前面:

undefined


是否有一个 JSL 功能可以让我与增强日志进行对话?

喜欢

log << list commands(10);

获取最后 10 条命令。

or log << list commands("3h"); for the commands of the last 3 hours?

或者

log << list commands(data table(dt));

获取所有由目标数据表dt触发的命令。

这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。

1 个已接受解答

已接受的解答
jthi
Super User

回复:与增强日志对话

增强日志位于名为日志的窗口内(如果您正在使用增强日志),从那里您可以使用显示属性并找出包含许多不同内容的表格框

Names Default To Here(1);

elog = Window("Log")[Table Box(1)] << get;
3 条回复3
jthi
Super User

回复:与增强日志对话

增强日志位于名为日志的窗口内(如果您正在使用增强日志),从那里您可以使用显示属性并找出包含许多不同内容的表格框

Names Default To Here(1);

elog = Window("Log")[Table Box(1)] << get;

这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。

hogi
Level XII

回复:与增强日志对话

凉爽的!

完毕

  • 从增强日志中收集表创建脚本、编辑脚本和报告创建脚本
  • 通过增强日志获取原始数据表,保存最终脚本
  • 用变量mydt替换原始表名以抵消表名冲突
    [-> 我对 Workflow Builder 的建议]
  • 删除重复/模板消息
  • 多个数据表具有相同的名称?假设最后一个是正确的
  • 有/无数据过滤器的报告
  • StealThisCode 可以迭代使用,优化报告并再次保存
    [类似于:将脚本保存到数据表-运行-编辑-将脚本保存到数据表...]

全部:

  • 调试

然后我会上传新版本...
图形生成器工具栏


它看起来可能是这样的:

stealThisCode.mp4
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
    • Chapters
    • descriptions off, selected
    • subtitles off, selected

      当前版本:

      查看更多...
      // autor: Holger Specht (hogi)
      // extension of https://community.jmp.com/t5/Discovery-Summit-Americas-2021/Steal-This-Code-Three-Upgrades-for-Scripts-Obtained-from-the/ta-p/398700
      // the idea:
      // - starting from a report
      // - use the enhanced log to collect all processing steps which lead from a saved ("original") data table to the report
      // - postprocess the steps to get a robus script
      // - save the script to the origial data table 
      
      
      Names Default To Here( 1 );
      
      
      show info = Function( {},
      	Caption( "please create a graph from a summary/subset table and run this script again. Add as many intermediate steps as you want  :)" );
      	Stop();
      );
      
      
      Try(
      	If( Current Report()[Outline Box( 1 )] << Get Title() == "Local Data Filter",
      		myScriptableObject = (Current Report()[Outline Box( 2 )] << Get Scriptable Object()),
      		myScriptableObject = (Current Report()[Outline Box( 1 )] << Get Scriptable Object())
      	),
      	showInfo()
      );
      mydt = myScriptableObject << Get Data Table();
      myWindowName = (mydt << Get Window()) << get window title();
      
      //developer is here =1;
      elog = Window( "Log" )[Table Box( 1 )] << make into data table(private( 1 ) );
      rowCreated = Eval( Eval Expr( Where( elog, :Result == "Data Table( \!"" || Expr( myWindowName ) || "\!" )" ) ) );
      
      nr = N Items( rowCreated );
      
      If( nr == 0 & N Items( Current Report() << XPath( "//PanelBox[text()='//steal this code']" ) ) == 0,
      	show info()
      );
      
      
      // if the current report is already created via stealThisCode, get the saved infos
      If( N Items( Current Report() << XPath( "//PanelBox[text()='//steal this code']" ) ),
      	dtOrig = (Eval( Parse( Current Report()[Text Box( 1 )] << get text  )) );
      	myScript = Parse( Current Report() [Text Box( 2 )] << get text);
      	
      	// if a data table was created with the same name, we have to get rid of the wrong log entries -> search for steal this code!
      	rowcreated =  Where( elog, :Message == "\!"steal this code\!"" );
      	nr = N Items( rowCreated );
      	rowcreated = rowcreated[{nr}]
      , // otherwise: get the original data table from the log and start with a draft data table
       
      	// the user created multiple data table with the same name? the last one might be the correct one ?!?!
      	rowcreated = rowcreated[{nr}];
      
      // select the right actions
      	
      	Window( "Log" )[Table Box( 1 )] << Set Selected Rows( rowCreated );
      
      // get script from the log and remove the comment block
      	myScript = Parse( Substitute( Window( "Log" )[Script Box( 1 )] << get text, "/*:", "" ) );
      
      	dtOrig = Arg( myScript, 1 );
      	myScript = Substitute(
      			Expr(
      				Names Default To Here( 1 );
      				//marks the start of the execution in the log
      				Print("steal this code");
      				mydt = _x_;
      			),
      		Expr( _x_ ), Name Expr( myScript )
      	);
      );
      
      
      Eval( Eval Expr( myRows = elog << get rows where( :Origin == "Window( \!"" || Expr( myWindowName ) || "\!" )" & Row() > Expr( rowCreated ) ) ) );
      if (N Items(myRows),
      Window( "Log" )[Table Box( 1 )] << Set Selected Rows( myRows );
      
      mydtch = Substitute( Char( mydt ), "DataTable(", "Data Table( ", ")", " )" );
      myscript2 = Window( "Log" )[Script Box( 1 )] << get text;
      myScript2 = Parse( Substitute(myscript2 , "/*:", "", mydtch, "mydt" ) ); // substitute get noch nicht
      Insert Into( myScript, Name Expr( myScript2 ) ));
      
      //I got all infos from the log
      Close( elog, noSave );
      
      reports = Associative Array(
      	Eval List( {Name Expr( Graph Builder() ), Name Expr( Distribution() ), Name Expr( Fit Model() )} ),
      	{1, 1, 1},
      	<

      这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。

      hogi
      Level XII

      回复:与增强日志对话

      测试版现已添加到Graph Builder 工具栏

      undefined

      这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。