Modalのさらなる支援こんにちは、
私はいくつかのコードにいくつかの表示ボックスを組み込もうとしている、私はデータテーブルから、表示ボックスに変数名を入力すると、以下の構文で網掛け領域に移入されることを願っていた、「]強調表示された領域には役に立ちません。だれでも何かアイデアがありますか。
Names Default To Here( 1 );
Clear Symbols();
pb = Page Break Box();
fileopen = "\\Kate\TIV\JMP Data.jmp";
var_name = New Window( "Variable Analysis",
<<MODAL></MODAL>
すべての回答に感謝します
再:モーダルでより多くの助けこんにちは、
今朝貼り付けたコードは、ヒストグラムを再び機能させるために、変数(Column(As Column(namevar)))から変数(X(As Column(namevar)))にヒストグラムを修正する必要があります。以下のコードは、ヒストグラム上のすべての参照線が正しい位置にあるときに機能したコードです。コードを変更するとヒストグラムがわずかに混乱したのはよくわかりません。
Names Default To Here ( 1 );
Clear Symbols ();
pb = Page Break Box();
fileopen= "\\cslg1.cslg.net\home\U0053680\home\desktop\Kate\TIV\JMP Data.jmp";
var_name = New Window ("Variable Analysis", << Modal, << Return Result,
Text Box ("Please enter Variable to analyse"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("Enter Variable Name"), nameVar = textEditBox("QA5030 Thiomersal FBV TIV (%w/v)"),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (var_name, var_name ["nameVar"] );
If (var_name ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (var_name, NItems(var_name)); // Removes the last item "Button 1" from the assignment list
Eval List(var_name); // the assignment from the display box are run
Show ( var_name, nameVar );
hist_param = New Window ("Histogram Bin Parameters", << Modal, << Return Result,
Text Box ("Select Histogram Bin Parameters"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("Minimum Amount"), miniAmount = numberEditBox(0.0078),
Text Box ("Maximum Amount"), maxAmount = numberEditBox(0.0122),
Text Box ("Bins Increase by"), increaseAmount = numberEditBox(0.0002),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (hist_param, hist_param ["miniAmount"], hist_param ["maxAmount"], hist_param ["increaseAmount"],
hist_param ["Button"] );
If (hist_param ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (hist_param, NItems(hist_param)); // Removes the last item "Button 1" from the assignment list
Eval List(hist_param); // the assignment from the display box are run
Show ( hist_param, miniAmount, maxAmount, increaseAmount );
ref_lines = New Window ("Reference Lines on Histogram", << Modal, << Return Result,
Text Box ("Select where to place Histogram Reference Lines"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("LSL"), lowerLimit = numberEditBox(0.008),
Text Box ("USL"), UpperLimit = numberEditBox(0.0120),
Text Box ("-3 Standard Deviations"), lesstandDev = numberEditBox(0.008459),
Text Box ("+3 Standard Devaitions"), maxstandDev = numberEditBox(0.010926),
Text Box ("Mean"), meanAmount = numberEditBox(0.0097375),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (ref_lines, ref_lines ["lowerLimit"], ref_lines["UpperLimit"], ref_lines ["lesstandDev"], ref_lines ["maxstandDev"], ref_lines ["meanAmount"],
ref_lines ["Button"] );
If (ref_lines ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (ref_lines, NItems(ref_lines)); // Removes the last item "Button 1" from the assignment list
Eval List(ref_lines); // the assignment from the display box are run
Show ( ref_lines, lowerLimit, UpperLimit, lesstandDev, maxstandDev, meanAmount);
Eval(
Substitute(
Expr(
distrib = New Window( namevar,
Distribution(
Continuous Distribution(
Column( As Column( namevar ) ),
Normal Quantile Plot( 1 ),
Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
),
SendToReport( Dispatch( {__myvar__}, "", Picture Box( 5 ), {Set Summary Behavior( "Collapse" )} ) )
)
) << Move Window( 634, 43 ) << Size Window( 807, 861 ) << Set Window Icon( "Distrib" )
),
Expr( __myvar__ ), namevar
)
);
Graph Builder(
Variables( X( :Name( "QA5030 Thiomersal FBV TIV (%w/v)" ) ) ),
Elements( Histogram( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
Local Data Filter,
SendToReport(
Dispatch( {}, "Histogram", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Histogram", Outline Box( 2 ), {Close( 1 )} ),
Dispatch(
{},
"QA5030 Thiomersal FBV TIV (%w",
ScaleBox,
{Min( hist_param ["miniAmount"] ), Max(hist_param ["maxAmount"] ), Inc(hist_param ["increaseAmount"] ), Minor Ticks( 0 ),
Add Ref Line( ref_lines ["lowerLimit"], "Solid", "Blue", "LSL", 1 ),
Add Ref Line( ref_lines["UpperLimit"], "Solid", "Blue", "USL", 1 ),
Add Ref Line( ref_lines ["lesstandDev"], "Solid", "Red", "-3SP", 1 ),
Add Ref Line(ref_lines ["maxstandDev"], "Solid", "Red", "+3SP", 1 ),
Add Ref Line( ref_lines ["meanAmount"], "Solid", "Green", "Mean", 1 )}
)
)
);
Control Chart Builder(
Size( 1187, 500 ),
Show Capability( 0 ),
Variables(
Subgroup( :Lot Number ),
Y( :Name( "QA5030 Thiomersal FBV TIV (%w/v)" ) )
),
Chart( Position( 1 ), Limits( Sigma( Moving Range ) ) ),
Chart( Position( 2 ), Limits( Sigma( Moving Range ) ) ),
SendToReport(
Dispatch(
{},
"QA5030 Thiomersal FBV TIV (%w",
ScaleBox,
{Min( 0.00779755917159763 ), Max( 0.0125370562130178 ), Inc( 0.0005 ),
Minor Ticks( 0 ), Add Ref Line(
0.012,
"Solid",
"Blue",
"USL (0.012)",
1
), Add Ref Line( 0.008, "Solid", "Blue", "LSL (0.008)", 1 )}
)
)
);再:モーダルでより多くの助けこんにちはtxnelson、
データテーブルを添付しました、それはまだ進行中の作業ですが、私が初めてJMPで作業して構文を知るための素晴らしい経験です。そのためには、変数間の切り替え機能が必要です。ケースQA5030とログ10の同じと同じレポート製品を持っている、それが正しい方法で進んでいるかどうかわからない。最後に、私はすべての個々のログを抑制し、分布、ヒストグラム、管理図の完全なログを作成し、PDFを作成できるようにする必要があります。以下はこれまでのコードです。
Names Default To Here ( 1 );
Clear Symbols ();
pb = Page Break Box();
fileopen= "\\cslg1.cslg.net\home\U0053680\home\desktop\Kate\TIV\JMP Data.jmp";
var_name = New Window ("Variable Analysis", << Modal, << Return Result,
Text Box ("Please enter Variable to analyse"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("Enter Variable Name"), nameVar = textEditBox("QA5030 Thiomersal FBV TIV (%w/v)"),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (var_name, var_name ["nameVar"] );
If (var_name ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (var_name, NItems(var_name)); // Removes the last item "Button 1" from the assignment list
Eval List(var_name); // the assignment from the display box are run
Show ( var_name, nameVar );
hist_param = New Window ("Histogram Bin Parameters", << Modal, << Return Result,
Text Box ("Select Histogram Bin Parameters"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("Minimum Amount"), miniAmount = numberEditBox(0.00728),
Text Box ("Maximum Amount"), maxAmount = numberEditBox(0.0122),
Text Box ("Bins Increase by"), increaseAmount = numberEditBox(0.0002),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (hist_param, hist_param ["miniAmount"], hist_param ["maxAmount"], hist_param ["increaseAmount"],
hist_param ["Button"] );
If (hist_param ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (hist_param, NItems(hist_param)); // Removes the last item "Button 1" from the assignment list
Eval List(hist_param); // the assignment from the display box are run
Show ( hist_param, miniAmount, maxAmount, increaseAmount );
ref_lines = New Window ("Reference Lines on Histogram", << Modal, << Return Result,
Text Box ("Select where to place Histogram Reference Lines"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("LSL"), lowerLimit = numberEditBox(0.008),
Text Box ("USL"), UpperLimit = numberEditBox(0.0120),
Text Box ("-3 Standard Deviations"), lesstandDev = numberEditBox(0.008459),
Text Box ("+3 Standard Devaitions"), maxstandDev = numberEditBox(0.010926),
Text Box ("Mean"), meanAmount = numberEditBox(0.009375),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HlistBox
);
show (ref_lines, ref_lines ["lowerLimit"], ref_lines["UpperLimit"], ref_lines ["lesstandDev"], ref_lines ["maxstandDev"], ref_lines ["meanAmount"],
ref_lines ["Button"] );
If (ref_lines ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (ref_lines, NItems(ref_lines)); // Removes the last item "Button 1" from the assignment list
Eval List(ref_lines); // the assignment from the display box are run
Show ( ref_lines, lowerLimit, UpperLimit, lesstandDev, maxstandDev, meanAmount);
Eval(
Substitute(
Expr(
distrib = New Window( namevar,
Distribution(
Continuous Distribution(
Column( As Column( namevar ) ),
Normal Quantile Plot( 1 ),
Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
),
SendToReport( Dispatch( {__myvar__}, "", Picture Box( 5 ), {Set Summary Behavior( "Collapse" )} ) )
)
) << Move Window( 634, 43 ) << Size Window( 807, 861 ) << Set Window Icon( "Distrib" )
),
Expr( __myvar__ ), namevar
)
);
Eval(
Substitute(
Expr(
Graph Builder(
Variables( Column( As Column( namevar ) ) ),
Elements( Histogram( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
Local Data Filter,
SendToReport(
Dispatch( {}, "Histogram", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Histogram", Outline Box( 2 ), {Close( 1 )} ),
Dispatch(
{__myvar__},
" ",
ScaleBox,
{Min( hist_param["miniAmount"] ), Max( hist_param["maxAmount"] ), Inc( hist_param["increaseAmount"] ), Minor Ticks( 0 ),
Add Ref Line( ref_lines["lowerLimit"], "Solid", "Blue", "LSL", 1 ), Add Ref Line(
ref_lines["UpperLimit"],
"Solid",
"Blue",
"USL",
1
), Add Ref Line( ref_lines["lesstandDev"], "Solid", "Red", "-3SP", 1 ), Add Ref Line(
ref_lines["maxstandDev"],
"Solid",
"Red",
"+3SP",
1
), Add Ref Line( ref_lines["meanAmount"], "Solid", "Green", "Mean", 1 )}
)
)
)
),
Expr( __myvar__ ), namevar
)
);
Eval(
Substitute(
Expr(
Control Chart Builder(
Size( 1187, 500 ),
Show Capability( 0 ),
Variables( Subgroup( :Lot Number ), Y( As Column( namevar ) ) ),
Chart( Position( 1 ), Limits( Sigma( Moving Range ) ) ),
Chart( Position( 2 ), Limits( Sigma( Moving Range ) ) ),
SendToReport(
Dispatch(
{},
__myvar__,
ScaleBox,
{Min( 0.00779755917159763 ), Max( 0.0125370562130178 ), Inc( 0.0005 ), Minor Ticks( 0 ),
Add Ref Line( 0.012, "Solid", "Blue", "USL (0.012)", 1 ), Add Ref Line( 0.008, "Solid", "Blue", "LSL (0.008)", 1 )}
)
)
)
),
Expr( __myvar__ ), namevar
)
);再:モーダルでより多くの助けあなたがあなたのデータテーブルのサンプルを私に提供しない限り、私はもっと私ができるとは思わない。
再:モーダルでより多くの助けこんにちはTxnelson、
そして、もう一度言っておきますが、実行しようとしたときにコードが少しつまずいていました。ヒストグラムの作成が完了していませんでした。
右クリックのヒントと「スクリプトの再フォーマット」が私のフォーマットにも役立つかもしれません。
そのすべてが完成したらあなたに教えてくれてアドバイスをもらいましょう。
再度、感謝します
再:モーダルでより多くの助け1。 ")"が多すぎました。 Graph BuilderとControl Chart Builderの両方のコードを正しく貼り付けていません。 Graph Builderの前にある「Eval」からすべてを選択するなど、コードのサブセクションを簡単に選択し、「)」からすべてのコードを選択できます。[評価]セクションの最後にある[]をクリックし、選択したコードを右クリックして[スクリプトの再フォーマット]を選択します。 それはコードを解析し、あなたがそれが見つけたどんなエラーでもあなたに与えるでしょう。 それはすぐにあなたが一致する "()"を持っていないとあなたに言ったでしょう。
2。プラットフォームを実行するためのコードが正しくありませんでした。 コードを正しくするために、構文のいくつかの異なる部分を変更しなければなりませんでした。 例として、管理図ビルダで指定したもの
Variables( Subgroup( :Lot Number ), Y( column( As Column( namevar ) ) ) ),
"Y(column(As Column(namevar ..........)"は配布プラットフォームの正しい構文ですが、管理図ビルダープラットフォームの構文ではありません。 Column()関数はありません。 そのため、コードを次のように変更する必要がありました。
Variables( Subgroup( :Lot Number ), Y( As Column( namevar ) ) )
3。 hist_param ["miniAmount"]や "ref_lines [" lesstandDev "]"のように、Eval()セクションの前にコードがないため、正しく解析できないかどうかを判断できない項目がいくつかあります。 だから私はあなたがそのためにあなた自身の上にいると思います。
これが修正されたコードのコピーです。 Substitute()関数に関する文書を必ず読んで、それがどのように機能するのかを理解してください。
Eval(
Substitute(
Expr(
Graph Builder(
Variables( Column( As Column( namevar ) ) ),
Elements( Histogram( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
Local Data Filter,
SendToReport(
Dispatch( {}, "Histogram", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Histogram", Outline Box( 2 ), {Close( 1 )} ),
Dispatch(
{__myvar__},
" ",
ScaleBox,
{Min( hist_param["miniAmount"] ), Max( hist_param["maxAmount"] ), Inc( hist_param["increaseAmount"] ), Minor Ticks( 0 ),
Add Ref Line( ref_lines["lowerLimit"], "Solid", "Blue", "LSL", 1 ), Add Ref Line(
ref_lines["UpperLimit"],
"Solid",
"Blue",
"USL",
1
), Add Ref Line( ref_lines["lesstandDev"], "Solid", "Red", "-3SP", 1 ), Add Ref Line(
ref_lines["maxstandDev"],
"Solid",
"Red",
"+3SP",
1
), Add Ref Line( ref_lines["meanAmount"], "Solid", "Green", "Mean", 1 )}
)
)
)
),
Expr( __myvar__ ), namevar
)
);
Eval(
Substitute(
Expr(
Control Chart Builder(
Size( 1187, 500 ),
Show Capability( 0 ),
Variables( Subgroup( :Lot Number ), Y( As Column( namevar ) ) ),
Chart( Position( 1 ), Limits( Sigma( Moving Range ) ) ),
Chart( Position( 2 ), Limits( Sigma( Moving Range ) ) ),
SendToReport(
Dispatch(
{},
__myvar__,
ScaleBox,
{Min( 0.00779755917159763 ), Max( 0.0125370562130178 ), Inc( 0.0005 ), Minor Ticks( 0 ),
Add Ref Line( 0.012, "Solid", "Blue", "USL (0.012)", 1 ), Add Ref Line( 0.008, "Solid", "Blue", "LSL (0.008)", 1 )}
)
)
)
),
Expr( __myvar__ ), namevar
)
);再:モーダルでより多くの助けこんにちはtxnelson、
テンプレートとしてあなたの返事を使うことで、もう一つ質問がありました。
Eval (
Substitute (
Expr (
Graph Builder(
Variables( Column ( As Column (namevar) ) ) ),
Elements( Histogram( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
Local Data Filter,
SendToReport(
Dispatch( {}, "Histogram", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Histogram", Outline Box( 2 ), {Close( 1 )} ),
Dispatch( { __myvar__ }, " ",
ScaleBox,
{Min( hist_param ["miniAmount"] ), Max(hist_param ["maxAmount"] ), Inc(hist_param ["increaseAmount"] ), Minor Ticks( 0 ),
Add Ref Line( ref_lines ["lowerLimit"], "Solid", "Blue", "LSL", 1 ),
Add Ref Line( ref_lines["UpperLimit"], "Solid", "Blue", "USL", 1 ),
Add Ref Line( ref_lines ["lesstandDev"], "Solid", "Red", "-3SP", 1 ),
Add Ref Line(ref_lines ["maxstandDev"], "Solid", "Red", "+3SP", 1 ),
Add Ref Line( ref_lines ["meanAmount"], "Solid", "Green", "Mean", 1 )}
Expr ( __myvar__ ), namevar
) ) )
)
)
);
Eval (
Substitute (
Expr (
Control Chart Builder(
Size( 1187, 500 ),
Show Capability( 0 ),
Variables(
Subgroup( :Lot Number ),
Y( Column ( As Column (namevar) ) )
),
Chart( Position( 1 ), Limits( Sigma( Moving Range ) ) ),
Chart( Position( 2 ), Limits( Sigma( Moving Range ) ) ),
SendToReport(
Dispatch( { __myvar__ }, " ",
ScaleBox,
{Min( 0.00779755917159763 ), Max( 0.0125370562130178 ), Inc( 0.0005 ),
Minor Ticks( 0 ), Add Ref Line(
0.012,
"Solid",
"Blue",
"USL (0.012)",
1
), Add Ref Line( 0.008, "Solid", "Blue", "LSL (0.008)", 1 )}
Expr ( __myvar__ ), namevar
) ) ) )
)
);それはヒストグラムと管理図のためのものです、しかし私はそれがうまくいくように思えません。
ありがとうヒープ
再:モーダルでより多くの助けおかげでpmroz、あなたは間違っていません、私のフォーマットはひどいです、そして私が取り組む必要がある何か、私は私がコードで何かを強調したかったのでボタンを使わなかったハイライト!!!!
再:モーダルでより多くの助けあなたが抱えている主な問題は、あなたが "nameVar"と呼ばれるあなたの変数を使いたいいくつかの場所がJMPがそれらを正しく解析する方法で指定されなければならないということです。
参考に
distrib = New Window( namevar,
あなたはただ文字列要素を扱っているだけで、JMPは単に変数名を指定するという単純な形式を扱います......変数nameVarの内容が文字列である限り、これはうまくいきます。
参考に
Column( As Column( namevar ) ),
JMPに変数nameVarを列参照として扱うように指示する必要があります。これは、As Column()関数を使用して簡単に実行できます。
あなたの最後の問題はもっと難しいです。 JMPはSendToReportを評価しません。 これは単なる正しいコードであると想定しており、変数の評価は行いません。 したがって、Substitution()関数を使用して評価を実行し、実行するコードをJMPに渡すことができます。
Eval(
Substitute(
Expr(
distrib = New Window( namevar,
Distribution(
Continuous Distribution(
Column( As Column( namevar ) ),
Normal Quantile Plot( 1 ),
Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
),
SendToReport( Dispatch( {__myvar__}, "", Picture Box( 5 ), {Set Summary Behavior( "Collapse" )} ) )
)
) << Move Window( 634, 43 ) << Size Window( 807, 861 ) << Set Window Icon( "Distrib" )
),
Expr( __myvar__ ), namevar
)
);
これが完全なスクリプトです。
Names Default To Here( 1 );
Clear Symbols();
pb = Page Break Box();
fileopen = "\\Kate\TIV\JMP Data.jmp";
var_name = New Window( "Variable Analysis",
<<MODAL></MODAL>
再:モーダルでより多くの助けあなたはもうすぐそこにいます。 このコードを試してください。 私はあなたのデータセットを持っていなかったので、私はあなたのファイルをBig Classで置き換えました。
Names Default To Here( 1 );
//fileopen = "\\Kate\TIV\JMP Data.jmp";
fileopen = "$sample_data\Big Class.jmp";
dt = open(fileopen);
var_name = New Window( "Variable Analysis", <<MODAL></MODAL>
ところで、ボタンを使った場合、コードを投稿するときに役に立ちます。 フォーマットも問題ありません。