In Java, is there a way to iterate through a list of variables
(e.g. Avg1, Avg2, Avg3) replacing the number as a variable?
I canNOT use an array, as they don’t come through in the Tridium environment.
I need something like this:
for (i=1;i<10;i++) {
getAvg(i).setValue(5);
}
I have to use the following format in order to set the value:
getVarName().setValue(value);
where VarName = name of variable, beginning with a capital letter
and value = value to set the variable to.
I finally figured out how to do what I needed.
This effectively iterates through “slots” in Tridium programs, which are of BStatusNumeric class.