Global Map Variable Usage (Initialization)

Global Map Variable Usage (Initialization)

roger_salaT7YTD
Contributor Contributor
224 Views
2 Replies
Message 1 of 3

Global Map Variable Usage (Initialization)

roger_salaT7YTD
Contributor
Contributor

Hello everyone,

 

Is it possible to initialize a Map as a global variable, allowing it to be accessed from a User Command, script, or Process Flow (already with the desired key/value pairs present)? (Note: I’ve observed that other data types, such as int, double, string, and array, can be initialized globally, as indicated by Initial Value.)

 

Thanks!

0 Likes
Accepted solutions (1)
225 Views
2 Replies
Replies (2)
Message 2 of 3

FelixMoehlmann
Mentor
Mentor
Accepted solution

There is no option to define a "reset value" for a global map directly. You can initialize the map in the model reset trigger or as one of the first actions when the model is started. You could store the initial configuration in a node somewhere (I sometimes create an extra "CustomData" subnode in the Tools folder where I store some global values) and clone it to the global map on reset.

Message 3 of 3

roger_salaT7YTD
Contributor
Contributor

Thank you very much!

0 Likes