嗨,伙計們,jmp 腳本的新手。我附上了一個腳本,它是在 2012 年編寫的,自從遷移到 jmp16 後現在無法運行,它在 jmp14 下工作。它基本上允許我讀取所有列參數的規格上限和下限。 以下是我讀入後的錯誤消息和我的數據文件的示例。任何幫助將不勝感激。我沒有寫劇本,那個人已經離開了公司。
提前感謝您的任何幫助。


有2個問題。
- 變量“版本”的值尚未設置。
- 在 JMP 16 中,代碼在遇到字符變量時停止。
我解決了這兩個問題。我實際上並沒有檢查字符的數據類型,而是檢查以確保建模類型是連續的。名義或有序數字列也不應設置規格限。
Names Default To Here( 1 );
version = JMP Version();
/*** This script will save the values in the specified rows as ***/
/*** Spec Limit column attributes for each respective column. ***/
/*** If there is no value for a particular column, the Spec ***/
/*** Limit attribute for that column will not be changed. By ***/
/*** saving the limits as column attributes, the Cpk analysis ***/
/*** along with limits reference markers, will automatically ***/
/*** be generated whenever a distribution is generated for a ***/
/*** column. ***/
/*** Alternatively, this script can be used to delete the ***/
/*** Spec Limits column attributes altogether by checking the ***/
/*** "Delete Attributes" checkbox. ***/
// 10/28/2004 v2.0
// 12/24/2012 v2.1, modified to handle limits with units, like "2 Ohms"
Limits_dlg = Dialog(
Text Box( Version ),
Text Box( " " ),
Text Box( " " ),
Text Box( " " ),
Text Box( "Spec Limits:" ),
Text Box( " " ),
LineUp( 2,
"LSL is in row", LSLRow = EditNumber( 1 ),
"USL is in row", USLRow = EditNumber( 2 )
),
Text Box( " " ),
Text Box( " " ),
Text Box( " " ),
Text Box( "My table already has Spec Limits attributes, and I want to delete them... " ),
DelAttr = Check Box( "Delete Attributes", 0 ),
Text Box( " " ),
HList( Button( "OK" ), Button( "Cancel" ) )
);
If( Limits_dlg["Button"] == -1,
Throw( "!User Cancelled" )
);
If( Limits_dlg["DelAttr"] == 1,
For( i = 1, i < N Col() + 1, i++,
Column( i ) << Delete Property( "Spec Limits" )
),
//Else...
For( i = 1, i < N Col() + 1, i++,
If( As Column( i ) << get modeling type == "Continuous",
LSpec = Column( i )[Limits_dlg["LSLRow"]];
LSpec = Num( Word( 1, Char( LSpec ) ) ); //Truncate to numeric if it has units appended to it.
USpec = Column( i )[Limits_dlg["USLRow"]];
USpec = Num( Word( 1, Char( USpec ) ) ); //Truncate to numeric if it has units appended to it.
Eval(
Substitute(
Expr(
Column( i ) << Set Property(
"Spec Limits",
{LSL( _LSL ), USL( _USL ), show limits( 1 )}
)
),
Expr( _LSL ), LSpec,
Expr( _USL ), USpec
)
);
)
)
);
謝謝德克薩斯,
還是一樣的錯誤信息。我相信您只添加了兩行,沒有其他更改?
我注意到我錯過了 org 文件中的原始行。
版本 =“作為屬性的限制,v2.1 2012 年 12 月 24 日”;
以上在原始文件中,不確定這是否會改變您提出的解決方案。
當我查看 Version 的值時,它肯定會顯示 16 女巫是我正在運行的。當我嘗試觀看 Names Default to Here 時它掛斷了?
名稱默認在此處 (1);
版本 = JMP 版本 ();
謝謝
Names Default to Here() 沒有什麼可看的。它只是設置默認範圍。如果您的代碼位於一段較大代碼的中間,則應將 Names Default to Here() 移至 JSL 的第一行,如果這不起作用,則完全刪除該行。我還添加了一個新的 If() 子句,如果該列不是數字連續列,則不處理規格限制。
去除那個
Version = JMPVersion();
並使用你的
Version = "Limits as Attributes, v2.1 December 24, 2012";