Re:腳本將當前報告保存為.ppt,由按鈕單擊觸發<< SavePresentation()消息對顯示框對像有效,因此您需要這樣的內容才能從您創建的平台獲取報告:
(obj << Report) << Save Presentation( "$DOCUMENTS/report.pptx" )
或者,您可以使用當前報告(),但如果您在創建報告之後和導出Powerpoint之前執行其他操作,則會導致一些問題。 這同樣適用於您的報告的創建 - 使用它可能是個好主意:
obj = dt << Gaussian Process(...)
'dt'將幫助確保使用正確的表,並且您可以在頂部添加Names Default To Here(1)以確保您創建的這些JSL變量不會與其他變量衝突。
Re:腳本將當前報告保存為.ppt,由按鈕單擊觸發嗨,非常感謝清晰度。我已經實現了您建議的更改但無法設置按鈕單擊以開始將報告保存為.pptx。按鈕單擊似乎加載一微秒但沒有任何內容保存到桌面。
// "//!" placed at the first line of script results in auto-run rather than to open the script
// //!
Names Default To Here(1);
//opens a new window
w = New Window( "Load Your Data Table",
Text Box( "Choose an Excel file in which your data is linearized into
columns and transformed into Log10[x]." ),
//button to load data
Button Box( "1. Load data table", dt = Open( ) ),
//button to set column type
Button Box( "2. Set column type to Numeric/Continuous", dt = current data table();
for (i = 1, i <= ncols(dt), i++, column(dt, i) << data type(numeric);
column(dt, i) << set modeling type(continuous))),
//button to initiate Gaussian modeling
Button Box( "3. Gaussian modeling", obj = dt << Gaussian Process(Estimate Nugget(1),
Set Correlation Function("Cubic"), Profiler(1),
SendToReport( Dispatch( {}, "Model Report", OutlineBox, {Close( 1 )})),
//automatically saves the Gaussian analysis as a script to the data table
<< Save Script to Data Table(
"Gaussian modeling",
<<PROMPT></PROMPT>
用於將當前報告保存為.ppt的腳本,由按鈕單擊觸發*我發現過去幾個非常相似的帖子已被解決,但我沒有使用這些解決方案......對不起,這是一個重複的帖子。
我正在嘗試添加由按鈕單擊觸發的腳本,該腳本可以將從高斯過程建模生成的當前打開的報告保存為.pptx文件。我找到了一個相關的例子“保存演示文稿(... )在腳本索引中,但無法將其作為Button Box的功能參數(“test”,[here])。
到目前為止,這是我的腳本:
// "//!" placed at the first line of script results in auto-run rather than to open the script
// //!
//opens a new window
w = New Window( "Load Your Data Table",
Text Box( "Choose an Excel file in which your data is linearized into
columns and transformed into Log10[x]." ),
//button to load data
Button Box( "1. Load data table", dt = Open( ) ),
//button to set column type
Button Box( "2. Set column type to Numeric/Continuous", dt = current data table();
for (i = 1, i <= ncols(dt), i++, column(dt, i) << data type(numeric);
column(dt, i) << set modeling type(continuous))),
//button to initiate Gaussian modeling
Button Box( "3. Gaussian modeling", obj = Gaussian Process(Estimate Nugget(1),
Set Correlation Function("Cubic"), Profiler(1),
SendToReport( Dispatch( {}, "Model Report", OutlineBox, {Close( 1 )})),
//automatically saves the Gaussian analysis as a script to the data table
<< Save Script to Data Table(
"Gaussian modeling",
<<PROMPT></PROMPT>