2011

Table Of Contents
Your script can have more than one event in it. However, the way you combine all event conditions in the script
becomes very important. That is you need to ensure the Boolean logic makes sense, the brackets are closed
properly, and so on.
NOTE Until the combination of all event conditions in the script is satisfied, your script will not be executed.
Event Types
The following event types are available in Navisworks:
On Start - event triggers a script as soon as scripting is enabled. If scripting is enabled when a file is loaded,
then any start events in the file will be triggered immediately. This is useful for setting up the initial conditions
of your script, such as giving initial values to variables, or moving the camera to a defined start point.
On Timer - event triggers a script at predefined time intervals.
On Key Press - event triggers a script with a specific button on the keyboard.
On Collision - event triggers a script when the camera collides with a specific object.
On Hotspot - event triggers a script when the camera is within a specific range of a hotspot.
On Variable - event triggers a script when a variable meets a predefined criterion.
On Animation - event triggers a script when a specific animation starts or stops.
Event Conditions
Events can be combined with a simple Boolean logic. To create an event condition you can use a combination
of brackets and AND/OR operators.
The brackets and logic operators can be added by right-clicking an event, and selecting the option from the
shortcut menu. Alternatively, you can click in the corresponding field in the Events view, and use the drop-down
list to select the desired option.
NOTE If you have more than one event in your script, by default the AND operator will be used. This means the script
only runs if all events have occurred.
To add an event
1 If the Scripter window is not already open, click Animation tab Script panel Scripter .
2 Select the desired script in the tree view.
3 Click the desired event icon at the bottom of the Events view. For example, click to create an On Start
event.
4 Review the event properties in the Properties view, and adjust them as necessary.
To test event logic
1 If the Scripter window is not already open, click Animation tab Script panel Scripter
.
2 Select the desired script in the tree view.
3 Right-click the Events view, and click Test Logic on the shortcut menu.
Work with Events | 347