NEW RELEASE! The 2024x Refresh2 Hot Fix 1 was released on May 2, 2025. For more information, see 2024x Refresh2 Hot Fix 1 Version News.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

During execution of a model, you can obtain a value of a global variable, which has already been defined, by calling getGlobalVariable(String variableName) of the ALH API. This method returns a Java object, which is the value of the global variable specified by the given variable name.
 

public Object getGlobalVariable(String variableName) {
	...
}

 

The example code is as follows

var a = ALH.getGlobalVariable("GLOBAL_COUNT") + 1

Note

You can obtain the value of a global variable directly by using its name.
var a = GLOBAL_COUNT + 1;


Activity

All
Personal filters
All