question

Bryan Suharik avatar image
1 Like"
Bryan Suharik asked Ryan Clark commented

Delete label on exit trigger?

Hello...is it possible to delete all labels in an item leaving a queue?

What would the code look like?

Thanks!

labels
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

·
Arun Kr avatar image
3 Likes"
Arun Kr answered Ryan Clark commented

Hi @Bryan Suharik,

In the exit trigger of the queue, use the following code.

// In FlexSim 2016 and earlier:
 clearcontents(labels(item));

// Using dot syntax in FlexSim 2017 and later
 labels(item).subnodes.clear();

Regards,

Arun KR

· 6
5 |100000

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

Dominik K avatar image Dominik K commented ·

What would it be in FlexSim 2018? 2019? 2020?
Asking for other people coming across here :)

1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel Dominik K commented ·

2017 still works, but completely in dot syntax:

item.attrs.labels.subnodes.clear();

item is declared as Object. If item is a reference as treenode, then you do:

item.as(Object).attrs.labels.subnodes.clear(); 
// or with method find
item.find(">/labels").subnodes.clear();


1 Like 1 ·
Dominik K avatar image Dominik K Joerg Vogel commented ·

Thank you very much!

0 Likes 0 ·
Show more comments
Bryan Suharik avatar image Bryan Suharik commented ·

That worked great! Thank you!

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.