下標引用錯誤顯示框在下面的腳本中,我期望返回的標題是“擬合威布爾分佈”,但我得到的是“擬合常態分佈”。我不確定出了什麼問題,非常感謝您的幫助。
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
db = dt << Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :height ),
Horizontal Layout( 1 ),
Vertical( 0 )
)
);
db << fit all;
Title_1 = report(db)[Outlinebox("Fitted?")] << get title;
print(Title_1);
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/62909i5A315F267940B1CB/Capture1.PNG" role="button" title="Capture1.PNG" alt="Capture1.PNG" /></span></SPAN>自動化和腳本編寫回覆:下標引用顯示框錯誤我使用 << Get XML on the Table Box 參考來查看是否有任何有趣的東西可以用來獲取我想要的內容

回覆:下標引用顯示框錯誤謝謝@jthi !那行得通!
順便說一句,對於我的學習,我不會使用“ischecked =“true””語法,因為我在腳本索引和顯示框屬性本身中都沒有找到它。能分享一下您是如何得出這個的嗎?我很高興學習這個過程以供將來參考。
回覆:下標引用顯示框錯誤您似乎在 for 循環內的大綱搜尋中缺少一些空格(“Fitted”->“Fitted”之後應該有空格)。
關於索引:很可能是按「原始」順序排列它們

以下是一個嘗試使用 XPath 避免複選框混亂的範例
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
db = dt << Distribution(Stack(1), Continuous Distribution(Column(:height), Horizontal Layout(1), Vertical(0)));
db << fit all;
rpt = db << Report;
rpt["Compare Distributions"][CheckBoxBox(1)] << set(3, 1); //make additional random selection
Wait(0);
tb = rpt[Outline Box("Compare Distributions"), Table Box(1)];
items = tb[1] << XPath("//CheckBoxBoxItem");
selections = {};
For Each({item, idx}, items,
If(Contains(item, "\[isChecked="true"]\"),
Insert Into(selections, idx);
);
);
dists = (tb[2] << Get)[selections];
For Each({distname}, dists,
ob = rpt[Outline Box("Fitted " || distname || " ?")];
show(ob << get title);
);
回覆:下標引用顯示框錯誤我認為這已經接近我正在尋找的東西了。我想做的是取得使用者選擇的分佈和對應的參數。我嘗試將腳本修改為下面的內容,但它不一定會給出正確的輸出。你能幫忙指出我哪裡做錯了嗎?
此外,這也引發了一些其他疑問:
- 為什麼<<取得選定的索引作為矩陣訊息以相反的順序傳回結果?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
db = dt << Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :height ),
Horizontal Layout( 1 ),
Vertical( 0 )
)
);
db << fit all;
rpt = db << Report;
rpt["Compare Distributions"][CheckBoxBox( 1 )]<<SET></SET>
Appreciate the help so far
回覆:下標引用顯示框錯誤啊你是對的。我之前並不知道所有可能的擬合都儲存在後台。很高興知道!
回覆:下標引用顯示框錯誤我會使用排序擬合表來進行參考。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
db = dt << Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :height ),
Horizontal Layout( 1 ),
Vertical( 0 )
)
);
db << fit all;
rpt = db << Report;
dist = rpt["Compare Distributions"][String Col Box( "Distribution" )] << Get;
Title_1 = rpt[Outline Box( "Fitted" || dist[1] || "?" )] << get title;
Print( Title_1 );
回覆:下標引用顯示框錯誤我認為所有不同的擬合仍然存在,即使它們不可見(它們位於 If Boxes 下),報告下標仍然會匹配這些並最終使用 ?通配符搜尋將匹配滿足您的搜尋的第一個輪廓框(在本例中為擬合常態分佈)

您可以使用 JMP 從「顯示屬性」功能表建立路徑(框路徑)
Report(platform)["height","Fitted Weibull Distribution"]
您可以寫更長的搜尋字詞(我會盡可能避免使用?)
Title_1 = report(db)[Outlinebox("Fitted W?")] << get title;
或使用 XPath 獲取所有標題並從中獲得您想要的內容
fit_obs = Report(db) << XPath("//OutlineBox[contains(text(), 'Fitted ')]");
fit_obs << get title;
回覆:下標引用顯示框錯誤我的猜測是 JMP 在記憶體中創建所有擬合輸出,因此當您要求
Title_1 = report(db)[Outlinebox("Fitted?")] << get title;
擬合法線是記憶體中的第一個法線,因此它是返回的法線。您可以透過以下方式繞過此問題
Title_1 = report(db)[Outlinebox("Fitted Weibull?")] << get title;
或者
Title_1 = report(db)[Outlinebox( 6 )] << get title;