question

Viktor TT avatar image
0 Likes"
Viktor TT asked Mischa Spelt answered

Popup window bye code

Hello!

In my simulation, I've implemented an error message system

(with msg() command), which create a popup message if one of my for() cycles do not found the correct value.

How can I write a codeline which automatically open the window which contain this code what printed the error message earlier?

If it's not so clear:

for() running --> there is no corrent value --> popup a message dialog --> I close the dialog --> automatically open the code window which contain the for() cycle.

FlexSim 18.0.1
error messagecode window
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
2 Likes"
Mischa Spelt answered

If you write the debug() command in your code, it will act like a manual breakpoint. So your code could be something like

for(...) {
  checkValue();
  if(!value) {
    if(msg("No value", "There is no value. Do you want to debug the code?", 4)) {
      debug();
    }
  }
}
5 |100000

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