我典型的工作日涉及创建多个表,每个表可能有多个图表/分析。
对于给定的表,是否可以自动将其所有打开的图形/分析保存为表本身中的脚本(然后可以选择关闭所有图形)。
退出 JMP 程序并必须保存所有表格而不丢失分析时存在一些耐心问题。
这部分JMP 13 文档的 部分解释了如何添加菜单项。 如果您对上面的代码执行您想要的操作感到满意,只需获取第一行,以及从“从这里开始”开始的所有内容。
我指的不是 JMP 项目,抱歉造成混淆。我从未真正探索过该功能,并且无法提供太多帮助。
我更多地指的是一般的工作任务。 就像当我正在进行分析时,工作区中堆满了数百份“有希望的”报告,突然我必须将注意力转移到 JMP 中具有更高优先级的工作上。 然后会话脚本就派上用场了,它让我能够推迟做出关于保存哪些分析和放弃哪些分析的艰难决定。 使用适当的名称保存脚本,关闭所有内容,然后使用干净的工作空间转向更紧急的任务。
稍后,我只需打开并运行会话脚本即可返回到之前的状态(思维和工作空间)。
谢谢 ... 我尝试使用项目,将表和报告拖到新创建的项目中。 关闭 JMP 并双击保存在 Windows 文件夹中的项目文件后,会出现项目对话框,要求我选择要打开的项目(我认为我已经通过在 Windows 文件夹中双击该项目来完成此操作)。
我做错什么了吗?
我使用“保存会话脚本...” (文件菜单)作为从数百个报告中快速清除会话的方法;例如,如果我需要重新启动或临时处理不同的项目。 稍后我可以通过运行脚本准确地离开我离开的地方。 所有(保存的)表格和报告都会自动打开并重新创建。
这是一个开始:它涵盖了许多案例,并且可以变得更加智能。 为了方便起见,您可以将其放在菜单项或按钮上:
Names Default To Here(1);
// Open a table to play with
dt = Open("$SAMPLE_DATA\Big Class.jmp");
// Open some windows in the session from this table (this would be done interactively)
ss = dt << Get Table Script Names;
for (s=1, s<=NItems(ss), s++, dt << runScript(ss[s]));
// Delete the saved scripts from the table
for (s=1, s<=NItems(ss), s++, dt << deleteTableProperty(ss[s]));
Wait(3);
// Start here . . .
// See the names of all the tables that are currently open in ths session
openTables = {};
for(t=1, t<=NTable(), t++, InsertInto(openTables, DataTable(t) << getName));
// See which windows are currently open in the session
openWindows = {};
for(w=1, w<=NItems(Window()), w++, InsertInto(openWindows, Window(w) << getWindowTitle));
// Handle each open table in turn
for(t=1, t<=NItems(openTables), t++,
// Truncate the table name if required
if(EndsWith(Uppercase(openTables[t]), ".JMP"), openTables[t] = Substr(openTables[t], 1, Length(openTables[t])-4));
for(w=1, w<=NItems(openWindows), w++,
If(StartsWith(openWindows[w], openTables[t]),
// This windows belongs to this table, so get the scriptable object
so = Window(openWindows[w])[OutlineBox(1)] << getScriptableObject;
// Save the script to the parent data table
so << saveScriptToDataTable;
// Close the window
Window(openWindows[w]) << closeWindow;
);
)
);