question

Philip Diem avatar image
1 Like"
Philip Diem asked Ben Wilson commented

How to find specific code when you forgot on which trigger you put it?

I try to get a model to work which i built a few weeks ago.

My model stops after some time and I`m quite sure it is because i used the command

stop() 

somewhere because i wanted the simulation to stop so i could check the state of some variables, change the speed and watch it from that point on.

Problem is i forgot on which trigger i used that and there are quite some objects in the model so its not easy to find. Is it somehow possible to find out why the simulation stopped? Or at least find out which event or trigger it was that stopped it?

FlexSim 17.0.3
stop
5 |100000

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

1 Answer

Mischa Spelt avatar image
3 Likes"
Mischa Spelt answered Ben Wilson commented

You can use the tree search functionality to do this. Open a Tree window (Tree button on the toolbar) and make sure you have the Quick Properties open. Under "Tree Navigation" make sure you click "Model" to go to the root of the model tree. Then in the "Search" panel, you can type "stop()" in the Find box, make sure to check "Search text", uncheck "Search names" and optionally toggle case sensitivity. In the results window, you will see all the tree nodes that contain the text, you can double click them or right-click and select Edit Code to open them in a code editor straight away.


search-code.png (1.1 MiB)
· 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.

Philip Diem avatar image Philip Diem commented ·

Thanks a lot, that was exactly was i was looking for. :) Now I wonder how i didn`t see that myself in the first place...

0 Likes 0 ·