モデリング用の小さな更新/進行ウィンドウをスクリプト化する方法に関する提案JMP コミュニティの皆様
モデル構築スクリプトを実行するとポップアップする小さなウィンドウをスクリプト化して、現在どのステップ (何千ものステップのうち) が実行されているかを表示することに興味があります。次のスクリプトのようなことを考えています。これは機能しますが、毎回新しいウィンドウが作成されます。
Names Default To Here( 1 );
imax = 5;
For( i = 1, i <= imax, i++,
update_window = New Window( "Progress Update",
Text Box( " Current step " || Char( i ) || " of " || Char( imax ), <<SET font="" size=""></SET>
Of course, my imax is much larger than 5, this is just a test script. I get an output at each iteration of the following (five windows in this case):
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap2.png" style="width: 400px;"><span class="lia-inline-image-display-wrapper" image-alt="Snap2.png" style="width: 254px;"><img src="https://us.v-cdn.net/6038925/uploads/images/22132iC6ED49231F83C2B5/Snap2.png" role="button" title="Snap2.png" alt="Snap2.png" /></span></SPAN>
But, as mentioned, this would make several thousand such windows, which I don't want. I'd like to update just the step "i" of the total.
The modeling script is built into a data table and has it's own FOR loop as it's running a giant tuning table one line at a time -- imax is the NRows() of this tuning table, and can be on the order of 24k+ rows. I want to insert into the main for loop a script that creates a <EM>シングル</EM> window that stays on the screen and tells the user what step "i" it's at out of NRows(). (Scrolling through the data table is tedious, and this seems like a reasonable solution.)
I don't need a progress bar, or anything like that, just a simple number that changes at each iteration of the main FOR loop. There is only one FOR loop, BTW.
Thanks for your suggestions!
DS
Re: モデリング用の小さな更新/進行ウィンドウをスクリプト化する方法に関する提案アップデート:
参照した投稿の JSL を変更した後、このテスト ウィンドウを作成して、進行状況をバー (視覚的) と実際の歩数 X/Y として表示することができました。これは楽しかったです。
Names Default To Here( 1 );
i = 1;
imax = 100;
dlgStatus = New Window( "Overall Modeling Progress",
V List Box(
dlg_gb = Graph Box(
Title( "Overall Modeling Progress" ),
FrameSize( 150, 15 ),
X Scale( 0, 100 ),
Y Scale( 0, 1 ),
yaxis( show major ticks( 0 ), show minor ticks( 0 ) ),
xname( "% complete" ),
yname( "" )
),
tb = Text Box(
" Current step " || Char( i ) || " of " || Char( imax ),
<<SET font="" size=""></SET><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap1.png" style="width: 400px;"><span class="lia-inline-image-display-wrapper" image-alt="Snap1.png" style="width: 218px;"><img src="https://us.v-cdn.net/6038925/uploads/images/22135iDC529E2F063EFA18/Snap1.png" role="button" title="Snap1.png" alt="Snap1.png" /></span></SPAN>
Re: モデリング用の小さな更新/進行ウィンドウをスクリプト化する方法に関する提案こんにちは@Mark_Bailey さん
この件に関して素早いご返答をいただきありがとうございます。完璧な解決策!
私はこの投稿を読んだ後、この方向に進みました: https://community.jmp.com/t5/Discussions/JMP-script-progress-indicator/mp/6057#M6056 。しかし、私はまだ数歩先にありました。テスト スクリプトでは、処理が非常に高速だったので、FOR ループに Wait() を追加する必要がありました。モデリングは各ステップで時間がかかるので、これについては心配していません。
これの将来のバージョンでは、上記の投稿で他のユーザーが行ったことを変更して、「進行状況バー」に変更する可能性があります。
再度、感謝します!、
DS
Re: モデリング用の小さな更新/進行ウィンドウをスクリプト化する方法に関する提案反復を開始する前に、更新を含むウィンドウを個別に開きます。テキスト ボックスへの参照を変数に保存します。 << Set Text( "new text" ) メッセージを反復内の参照に送信します。
Names Default To Here( 1 );
imax = 5;
update_window = New Window( "Progress Update",
tb = Text Box( "Initial message", <<SET font="" size=""></SET>