question

Jay K9 avatar image
0 Likes"
Jay K9 asked Joerg Vogel commented

Delete 3D object created only by script.

Hello
I have created few objects by script at the start of model. However, I only want to to use

Table.query("DELETE  FROM Objects()");

to delete objects created by script and not the one I manually dragged and dropped. Is there a way I could do this?

FlexSim 23.0.15
flexscriptautobuild
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

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented
Table.query("DELETE FROM Objects() WHERE Name != 'Queue1'");

Exclude by Name

Get all attribute columns. You need a global table for this in toolbox.

Table myTab = Table.query("SELECT * FROM Objects()");
myTab.cloneTo(Table("GlobalTable1"));
· 5
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
Table.query("DELETE FROM Objects() WHERE Class = 'Queue' AND Name != 'Queue1'");
0 Likes 0 ·
Jay K9 avatar image Jay K9 Joerg Vogel commented ·
I am creating all script generated 3D object from a table can I just specific delete object where object is queue and is generated from the table?
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jay K9 commented ·
@Jay K9, can you give an example?
0 Likes 0 ·
Show more comments

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.