question

vigneshs avatar image
0 Likes"
vigneshs asked Jeanette F commented

command to open model and run from scripts

runflexsimmodelsilently.zip

results.txt

The zip contains model and bat script to run the model silently and generates the results.txt (attached) but i would like to know how to parallely open the actual model and run it when the batch script is called.

FlexSim 21.1.3
flexsim 21.1.3runcommand
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @vignesh.s, was vigneshs's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
vigneshs avatar image
0 Likes"
vigneshs answered Logan Gold commented

Changing command from nogui_disablemsg_runscript to disablemsg_runscript is the solution i figured. Is there any other command which can open the model but also run it at the same time.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Logan Gold avatar image Logan Gold ♦♦ commented ·

@vignesh.s, you are correct that removing the nogui flag should make it so FlexSim will be displayed when running the batch file.

With only that change, the software still runs the model when the batch file is executed, but it might be running so fast that you don't see the model running. This is because script.txt is using the runspeed() command to set the run speed to 10000. If you remove that line in the script file, or change it to something else like runspeed(4);, then you should see the model run at a more easily seen speed.

Also, the test.fsm model uses FlexScript to stop the model run at a certain point, create/modify the results.txt file, then close the FlexSim software. I believe this is all done in a Sink's On Entry trigger, probably when a specified amount of flowitems enters the Sink. You can try modifying that trigger so the model doesn't automatically close and you can still look through the model even after it is stopped.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.