2011

Table Of Contents
2 Right-click in the tree view, and click Add New Folder on the shortcut menu.
3 Click the default folder name, and type in a new name.
TIP Use names that can help you to identify your scripts in future.
4 Select a script you want to add to your new folder. Hold down the left mouse button, and drag the mouse
to the folder name. When the mouse pointer changes to an arrow, release the mouse button to drop the
script into the folder.
Alternatively, select the script, and hold down the right mouse button. Drag the mouse to the folder name.
When the mouse pointer changes to an arrow, release the right mouse button, and click Move Here on the
shortcut menu.
Work with Events
An event is the occurrence of an incident or a situation, such as a mouse click, key press, or collision, which
determines whether your script is run or not.
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.
346 | Chapter 13 Animate Objects