question

Lucas Klein avatar image
0 Likes"
Lucas Klein asked Lucas Klein commented

Kill FlexSim process by script/cmd after model run

Dear All,

I was looking for execute FlexSim models in background through cmd prompt as explained at this forum post and I've been able to do it successfully

I just had a little problem that everytime that i've executed the .bat file it created a new FlexSim process in task manager. Is there any script to kill this process after the model execution ends? I've tried using the taskkill command, but it kills all FlexSim models opened, so if I was running any simulation in parallel it will be closed too

Thanks in advance

FlexSim 19.1.0
batch filecmdtask managerbackground execution
report4.jpg (66.0 KiB)
· 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.

Lucas Klein avatar image Lucas Klein commented ·

Also, the DLL connected to the model became unable to edit/delete/rename untill I kill all the processes

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Lucas Klein commented

Use the cmdexit() command in FlexSim.

· 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.

Lucas Klein avatar image Lucas Klein commented ·

Thanks @phil.bobo I had not known this command

0 Likes 0 ·