Shared global variables in iLogic

Top  Previous  Next

When declaring variables in an iLogic rule, that variable is only accessible within the context of that rule. If you need to create a variable and set its value to use within numerous rules, then Shared Variables are the answer.


' Declaring shared variables

SharedVariable("VariableName") = "This is the value" 

SharedVariable("cylinderHeight") = Parameter("CylinderHeight")


Once a Shared Variable has been declared and a value provided, then it can be consumed and updated as necessary.


' Using shared variables 

Dim cylinderHieght As Double = SharedVariable("cylinderHeight")

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)