Vorschlag zum Erstellen eines Skripts für ein kleines Aktualisierungs-/Fortschrittsfenster für die ModellierungLiebe JMP-Community,
Ich bin daran interessiert, ein kleines Fenster zu erstellen, das angezeigt wird, wenn ich mein Modellerstellungsskript ausführe, um mir anzuzeigen, in welchem Schritt (von Tausenden) es gerade ausgeführt wird. Ich denke darüber nach, so etwas wie das folgende Skript zu erstellen, das funktioniert, aber jedes Mal ein neues Fenster erstellt.
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>einzel</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
Betreff: Vorschlag zum Erstellen eines Skripts für ein kleines Aktualisierungs-/Fortschrittsfenster für die ModellierungAktualisieren:
Nachdem ich die JSL in dem Beitrag, auf den ich verwiesen habe, geändert hatte, konnte ich dieses Testfenster erstellen, um den Fortschritt als Balken (visuell) plus die tatsächliche Schrittzahl X von Y anzuzeigen. Das hat Spaß gemacht!
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>
Betreff: Vorschlag zum Erstellen eines Skripts für ein kleines Aktualisierungs-/Fortschrittsfenster für die ModellierungHallo @Mark_Bailey ,
Vielen Dank für Ihre schnelle Antwort hierzu. Perfekte Lösung!
Ich habe mich in diese Richtung bewegt, nachdem ich diesen Beitrag gelesen hatte: https://community.jmp.com/t5/Discussions/JMP-script-progress-indicator/mp/6057#M6056 . Aber ich war immer noch ein paar Schritte entfernt. Für das Testskript musste ich ein Wait() in die FOR-Schleife einfügen, weil es so schnell ging. Da die Modellierung bei jedem Schritt länger dauert, mache ich mir darüber keine Sorgen.
In einer zukünftigen Version davon werde ich es möglicherweise in einen „Fortschrittsbalken“ ändern, indem ich die Vorgehensweise des anderen Benutzers im obigen Beitrag ändere.
Danke noch einmal!,
DS
Betreff: Vorschlag zum Erstellen eines Skripts für ein kleines Aktualisierungs-/Fortschrittsfenster für die ModellierungÖffnen Sie das Fenster mit dem Update separat und vor Beginn der Iteration. Speichern Sie einen Verweis auf das Textfeld in einer Variablen. Senden Sie die Nachricht << Set Text( "new text" ) an die Referenz innerhalb der Iterationen.
Names Default To Here( 1 );
imax = 5;
update_window = New Window( "Progress Update",
tb = Text Box( "Initial message", <<SET font="" size=""></SET>