Call command

Allows you to call other Visual Logic sections. After the chosen Visual Logic section has been called and its commands have been run, any commands after the Call will be obeyed. This is useful if you have some common Visual Logic code that you want to use in a number of places.

For example, you can call a Visual Logic section, which calculates the time spent in an Activity, and this can be called at each Activity. On the Ribbon, go to Visual Logic > New to create Visual Logic code that is not associated with any Simul8 event. This can then be called and reused in many other places, meaning that development and debugging time are reduced. In other words, if an error is found in the newly created Visual Logic Section, it only needs to be fixed within that section, and not at all points the Logic is used.

Parameters

Title of another Visual Logic Section.

Annotated Example

Within Visual Logic Section 2, the Logic included in Visual Logic Section 1 is run. You can change the name of a Visual Logic Section to make it representative of the process you are looking to call (e.g. Calculate_TimeInActivity).