jmp スクリプト内のオブジェクト参照JMPコミュニティの皆様、こんにちは。
JMPスクリプトのオブジェクト参照について質問があります。以下のコードは実行できますが(JMP Pro 17.2)、プロセススクリーニングはボタンも配置されているMake_Win関数ではなく、別のウィンドウでポップアップ表示されます。
PS = dt << プロセススクリーニング(...);部分をV リスト ボックス内に記述すると、動作は期待どおりになりますが、コードの可読性が低下し、乱雑になります。
PS を他の場所で定義し、その参照のみを関数内に含める方法はありますか (以下の例を参照)。または、以下のコードを意図したとおりに動作させるにはどうすればよいでしょうか。
Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
PS = dt << Process Screening(
Y( Eval(Cols)),
Control Chart Type( "Indiv and MR" ),
Minimum Process Length( 1 ),
Use Medians instead of Means( 1 ),
Show tests( 0 ),
Test 1( 0 ),
Cp( 1 ),
Spec Limits( 1 ),
);
Make_Win = Expr(
New Window( "ProcessScreening",
Vlist_box = V List Box(
PS,
MyButton = Button Box( "SelectedRows", SendRows ),
),
),
);
SendRows = Expr(
print_cols = Report( PS )[Table Box( 1 )][String Col Box( 1 )] << getselectedrows();
Print( Report( PS )[Table Box( 1 )][String Col Box( 1 )][print_cols] );
);
Make_Win();ありがとう、
JNS
自動化とスクリプトRe: jmp スクリプト内のオブジェクト参照platform(...) 関数を使用します。
Scripting Index is in the Help menuスクリプトインデックスはヘルプメニューにあります
プラットフォームが起動すると、新しいウィンドウ構造内で作成される場合は新しいウィンドウに、ディスプレイボックス構造内で作成される場合はディスプレイボックスにアタッチされます。それ以外の場合は、新しいウィンドウが作成されます。platform() 関数は、ルートディスプレイボックスを何もアタッチせずに返します。過去には、dt< の周りに borderbox ラッパーを使用することも推奨しました。
スクリプト インデックスの例は、次のようにするとわかりやすくなります。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p=Platform(
dt,
Bubble Plot(
X( :weight ),
Y( :age ),
Sizes( :height ),
Title Position( 0, 0 )
)
);
New Window( "Platform example",
H List Box(
Platform(
dt,
Bubble Plot(
X( :weight ),
Y( :height ),
Sizes( :age ),
Title Position( 0, 0 )
)
),
p
)
);
Re: jmp スクリプト内のオブジェクト参照これを行うにはさまざまなオプションがありますが、ここに1つあります
Names Default To Here(1);
Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
ps_collector = V List Box(
PS = dt << Process Screening(
Y(Eval(Cols)),
Control Chart Type("Indiv and MR"),
Minimum Process Length(1),
Use Medians instead of Means(1),
Show tests(0),
Test 1(0),
Cp(1),
Spec Limits(1),
)
);
SendRows = Expr(
print_cols = Report(PS)[Table Box(1)][String Col Box(1)] << getselectedrows();
Print(Report(PS)[Table Box(1)][String Col Box(1)][print_cols]);
);
nw = New Window("ProcessScreening", Vlist_box = V List Box(ps_collector),
Button Box("OK", sendrows);
);