Setting and Overriding Global Variables from a Project Library
You can export global variables to a project library and import the library into other projects (see Working with Project Libraries).
When multiple global variables have the same name, one overrides the rest and is used in the project. The name, datatype, and default value of the overriding global variable are used. The override order is as follows:
- When multiple project libraries have the same-named global variable, the global variable from the library closest to the top of the project library list overrides any in lower libraries.
- When a local project global variable has the same name as a project library global variable, the local project global variable overrides the project library global variable.
The Global Variables view presents a merged list. A blue upward pointing arrow in the row for a global variable () indicates that this global variable overrides another global variable. The source of the global variable is shown in the Project Source column to the right of the arrow.
To see all global variables, including overridden ones, open the global variable editor and expand Project Dependencies and project libraries. Global variables from project libraries are not editable.