Auto Reference Global Data Items

When an Object Global Data Item is created it must normally be manually set to refer to an Object that exists in the simulation before it can be used. For example:

 SET Activity_GDI = "Activity 1"

 SET Activity_GDI.Operation Time = 20

This code sets the Object Global Data Item called “Activity_GDI” to be Activity 1, and then allows changes to be made to Activity 1's properties via the Global Data Item.

The AutoReference function is located in the Global Data Item properties dialog. Use the Information Store (on the Data & Rules tab) and create a NEW Global Data Item. Select Simulation Object to create this as an Object Global Data Item.

Clicking the AUTO-REFERENCE button opens up another dialog that contains a list of all objects of that type that exist in the simulation. Checking the box next to each object auto-references that object with the Global Data Item meaning that any visual logic referenced within that object containing the Global Data Item will refer to the specific object.

This is a very powerful feature as it allows a single piece of Visual Logic to be written and called from within a set of objects, allowing a piece of Visual Logic to be written and edited in a single place.

See Also