更改列 USL 和 LSL 屬性的 JMP 腳本我有一個 JMP 腳本函數,它從儲存在「Ntwk Osnr Spec Table Filename」變數中的文字檔案取得一組規格限制。 我正在嘗試更改“Ntwk Osnr 資料表”資料表中“PctDiff_ModBer_q_calcBer”列的 USL 和 LSL 列屬性。 但是,當我執行以下 JMP 腳本命令時,我沒有收到腳本錯誤,但 USL 和 LSL 列屬性未更新。 從規格限值獲得的規格限值為 1.7。 當我執行以下幾行時,Speclimit 變數中的值 1.7 已更新,但 USL 和 LSL 列屬性未更新。 如果我將 Speclimit 變數設為常數 1.7,則 USL 和 LSL 列屬性將分別設為 1.7 和 -1.7。 所以問題一定是從文字檔中取得值,但我可以找出問題所在。 有人可以讓我知道從文字檔案取得規格限制並讓它更新列屬性的解決方案是什麼嗎?
Include( "$CommonScriptPath/Function - Obtain Spec Limit Value.jsl" );
Speclimit = ObtainSpecLimit(
Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc"
);
dt = Open( Ntwk Osnr Data Table Filename, invisible );
Data Table( dt ):PctDiff_ModBer_q_calcBer << Set Property(
"Spec Limits",
{LSL( (Speclimit * (-1)) ), USL( Speclimit ), Target( 0 ), Show Limits( 1 )}
);進階統計建模自動化和腳本編寫消費者與市場研究資料混合與清理大規模客製化回覆:更改列 USL 和 LSL 屬性的 JMP 腳本您在 JMP 清單中指定的計算在執行之前不會進行評估。因此,在 Substitution 函數完成該操作之前,必須對該語句進行完全解析和評估
Include( "$CommonScriptPath/Function - Obtain Spec Limit Value.jsl" );
Speclimit = ObtainSpecLimit(
Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc"
);
dt = Open( Ntwk Osnr Data Table Filename, invisible );
Eval(
Substitute(
Expr(
Data Table( dt ):PctDiff_ModBer_q_calcBer <<
Set Property(
"Spec Limits",
{LSL( __LSL__ ), USL( __USL__ ), Target( 0 ), Show Limits( 1 )}
)
),
Expr( __LSL__ ), Speclimit * (-1),
Expr( __USL__ ), Speclimit
)
);
回覆:更改列 USL 和 LSL 屬性的 JMP 腳本確保值是數字並嘗試使用 Eval(EvalExpr()) 和 Expr()
Include("$CommonScriptPath/Function - Obtain Spec Limit Value.jsl");
Speclimit = ObtainSpecLimit(Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc");
dt = Open(Ntwk Osnr Data Table Filename, invisible);
Eval(
Eval Expr(
Data Table(dt):PctDiff_ModBer_q_calcBer << Set Property(
"Spec Limits",
{LSL(Expr(Speclimit * (-1))), USL(Expr(Speclimit)), Target(0), Show Limits(1)}
)
)
);
使用 Eval Insert、Eval Expr、Parse 和 Substitute 將一個表達式插入另一個表達式