question

Max B avatar image
0 Likes"
Max B asked Max B commented

Automatically Reset Labels on Objects created dynamically

I have a model where I use FlexScript to create a large number of objects and then set labels on those objects. I'd like those labels to reset to their initial values on reset. Is there a way to do this after I create the objects in FlexScript so I don't have to click the 'Automatically Reset' checkbox on each of my created objects?


Thanks!

FlexSim 21.2.4
set labelreset label
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Max B commented
Object obj=Model.find("Processor1");
createcopy(labels(obj),obj,0,1,0,0).name="labelreset";
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Max B avatar image Max B commented ·
Great, thanks!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.