This commit is contained in:
Dion Moult
2023-05-24 19:33:14 +10:00
parent e6a90d6786
commit 122e17d5b5
+1 -1
View File
@@ -217,8 +217,8 @@ class Drawing(blenderbim.core.tool.Drawing):
@classmethod
def delete_drawing_elements(cls, elements):
for element in elements:
ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element)
obj = tool.Ifc.get_object(element)
ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element)
if obj:
obj_data = obj.data
bpy.data.objects.remove(obj)