question

Adrian M avatar image
0 Likes"
Adrian M asked Adrian M commented

How to update the token's label to another label?

I would like to update the token's label to another label name. For example, update label name "SurfacePrep1" to "SurfacePrep1Inspection" on the Custom Code activity.


The child tokens were able to be updated as you can see in the screenshot below.

1710790391979.png

Thank you,

FlexSim 23.0.2
labelscode
1710790391979.png (106.5 KiB)
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

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Adrian M commented

Without using any custom code, you can assign the value to a new label and remove the old one.

1710836467618.png

To change the name of an existing value, use the code below.

token.labels["oldName"].name = "newName";

1710836467618.png (15.5 KiB)
· 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.

Adrian M avatar image Adrian M commented ·
Thank you Felix! That worked for me :).
0 Likes 0 ·