How to delete bodies #2612
-
|
I have a list of bodies that belong to different components. How can I delete them all at once? For example: List_bodies = [a, b, c, d, and several others] "a" and "b" are from component_1, "c" is from component_2, "d" is from component_3 etc. I want to remove all bodies in "List_bodies". What is the best way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @harikrushna171! I would say that the easiest way to do that is as follows: list_bodies = [a, b, c, d]
for body in list_bodies:
design.delete_body(body)Or if you want to do it through list comprehension: [design.delete_body(b) for b in list_bodies] |
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much |
Beta Was this translation helpful? Give feedback.
Hi @harikrushna171!
I would say that the easiest way to do that is as follows:
Or if you want to do it through list comprehension: