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

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

philip_diem
Not applicable
45 Views
2 Replies
Message 1 of 3

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

philip_diem
Not applicable

[ FlexSim 17.0.3 ]

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?

Accepted solutions (1)
46 Views
2 Replies
Replies (2)
Message 2 of 3

mischa_spelt
Advisor
Advisor
Accepted solution

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.

6302-search-code.png

Message 3 of 3

philip_diem
Not applicable

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