In some cases, you may want to define global properties that can be referenced throughout your model. Of course, one way to do this is to simply define Data elements at the global level of the model (i.e., outside of any localized Containers).
GoldSim also provides a more convenient way to do this via the Globals tab of the Simulation Settings dialog:
This dialog allows you to add Global variables (referred to as Global properties) to your model. This is done by pressing the Add… button. When you do so, the following dialog is displayed:
The Name (ID) is the name by which the Global variable can be referenced throughout your model. This Name has the same restrictions as an element ID. The Description is an optional description of the variable. You must then specify the Display Units and Type information (e.g., value/condition, scalar/vector/matrix) for the variable. Finally, you specify the Definition for the variable. Typically, this will be a single value However, it can also be an equation (involving constant values). This field, cannot, however, reference any other outputs in the model.
Once you have added a Global property, you can subsequently reference the variable by using the specified Name that you defined previously, preceded by a ~. For example, if you create a Global called X, you could reference it in input fields anywhere within the model as ~X.
Global properties are special instances of what are referred to as locally available properties in GoldSim. Locally available properties are accessed by using a ~. Global properties are available in the Insert Link dialog within the Available Properties folder:
Note: Because a Global property is always referenced using a ~, a Global property can share a name with an element. For example, if a Global property existed named X and a Data element also existed with the same name, there would be no conflict. The Global property would be referenced as ~X, and the Data element's output would be referenced as X.
Note: The Global properties tab is also used to "hold" the input interface for a SubModel that has been exported as a standalone model.
Learn more about: