mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 23:50:59 +00:00
Fix error when filling has no IFC type
This commit is contained in:
@@ -128,15 +128,18 @@ class AddFilling(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
self.file = IfcStore.get_file()
|
self.file = IfcStore.get_file()
|
||||||
element_id = obj.BIMObjectProperties.ifc_definition_id
|
element_id = obj.BIMObjectProperties.ifc_definition_id
|
||||||
|
opening_id = opening.BIMObjectProperties.ifc_definition_id
|
||||||
|
if not element_id or not opening_id:
|
||||||
|
return {"FINISHED"}
|
||||||
ifcopenshell.api.run(
|
ifcopenshell.api.run(
|
||||||
"void.add_filling",
|
"void.add_filling",
|
||||||
self.file,
|
self.file,
|
||||||
**{
|
**{
|
||||||
"opening": self.file.by_id(opening.BIMObjectProperties.ifc_definition_id),
|
"opening": self.file.by_id(opening_id),
|
||||||
"element": self.file.by_id(element_id),
|
"element": self.file.by_id(element_id),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
Data.load(IfcStore.get_file(), element_id)
|
Data.load(self.file, element_id)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user