PTC ALD in Arbortext Styler > Components of Documents and Templates > Variables, Counters, and FISH > Global Variables
Global Variables
Global variables are global to the PTC Arbortext Layout Developer application that is running. If you set a global variable, anything in the current version of PTC Arbortext Layout Developer can access it, including different documents. Global variables were traditionally used extensively in scripting to help drive automation processes and to pass information from the script into formatting processes. While the introduction of JavaScript reduced the need for global variables, there are still some use cases which can only be supported using global variables.
Global variables can be accessed in several ways:
from Perl
from PTC Arbortext Layout Developer scripting
from PTC Arbortext Layout Developer’s inline showstring language
from JavaScript
Refer to System Information with Global Variables for information on accessing global variables from JavaScript.
PTC Arbortext Layout Developer uses global variables to store some important application-specific information. These can also be accessed and used — refer to PTC Arbortext Layout Developer Feature Variables.
PTC Arbortext Layout Developer Feature Variables
PTC Arbortext Layout Developer uses global variables to store some application-specific information, including features that are configured for the product in its application and printer settings. It is recommended that you do not overwrite these variables unless you are highly experienced.
The variables can be tested. Some are available through the fApplication object, for example:
fApplication.isUnicode — property is stored in PTC Arbortext Layout Developer as one of the feature variables ^_f_UNICODE
fApplication.features — array that provides access to all feature variables not given their own property