I try to auto assign value for a list of user defined attribue of object such as:
For i:=1 to n loop For j:=1 to m loop str_to_obj("A"+i+".B"+j) := 0; next; next;
-A: point to the path such as the transporter named "A'
-B: name o f the user defined attribute (Type: integer);
However, it doesnot work. Is there anyway to do it by a list or we have do it manually?
Solved! Go to Solution.
you can use the method setAttribute and you need to transform the numbers to strings
For i:=1 to n loop For j:=1 to m loop str_to_obj("A"+to_str(i)).setAttribute("B"+to_str(j),0); next; next;
freelance simulation specialist
you can make this work by setting the atribute B with setAttribute in this way:
for var i := 1 to n
for var j := 1 to m