How to use the Visual Logic Builder

Visual Logic is very easy to change. To change a line hold the ALT key and double click it.

To insert new lines of Visual Logic immediately under the currently highlighted line click the RIGHT mouse button or press INSERT. Choose the type of line you want. Once you have chosen a type of line the appropriate line dialog box will appear to help you complete the line.

To insert a new line BEFORE the current line hold down CONTROL when you click the RIGHT mouse button or press INSERT.

In the Visual Logic Builder you build up a series of lines that Simul8 reads and obeys at the appropriate time. Each line in a Visual Logic Window is obeyed one-at-a-time. Sub-blocks (for example inside a loop) are obeyed under the control of their parent. For example, if there are 2 indented lines within a loop that is looping from 1 to 5, the indented lines will run 5 times.

Lines can be dragged around to move them. Hold down the ALT key while dragging a line to copy it instead of just moving it (note there is an option in the right-click menu under Edit Options that disables the requirement for ALT if this is preferred).

In addition to copying Visual Logic by holding down the control key while dragging, lines can be copied/pasted to/from the windows clipboard and then into other blocks of Visual Logic (even in other simulations). If you copy some Visual Logic that refers to a simulation object that does not exist in the new context, Simul8 will highlight what objects need to be created in the new simulation.

Code can either be copied using the standard Windows shortcut keys or through the Visual Logic command menu.

Alternatively, you can use the Free Edit Mode. This allows the user to free-type directly into the Visual Logic window

See Also