question

Sandy Huang avatar image
0 Likes"
Sandy Huang asked Sam Stubbs answered

How to use script to destroy all or certain number of items in a queue?

FlexSim 18.0.2
scriptdestroy object
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

·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

If you want to do this with a script, I would write a "while" loop.

Object Queue = so().as(Object);  // get a reference to your Queue.

while (Queue.subnodes.length > 0)  // you can changes this to be whatever value you want.
{
	Object item = Queue.first;
	item.destroy();
}

5 |100000

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

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.