Cancel
Showing results for 
Search instead for 
Did you mean: 

Addressing all children of a class element in Tecnomatix Plant Simulation

Valued Contributor
Valued Contributor

Distribution_center.jpg

 

Deleting all children of a class:

Be careful with this one!

You might want to save your model before trying it: :smileyhappy:

if you want to delete all children of a class object with a method you have to count backwards (as the deleted objects will immideately be missing in the counting). This lines will do the job:

 

is     

   i,n:integer;

do     

 

     n:=.MaterialFlow.Line.numChildren;

     for i := n downto 1 loop                  --count backwards           

         .MaterialFlow.Line.childNo(i).deleteobject;     --delete object     

     next;

end;

Contributors