mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +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"}
|
||||
self.file = IfcStore.get_file()
|
||||
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(
|
||||
"void.add_filling",
|
||||
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),
|
||||
},
|
||||
)
|
||||
Data.load(IfcStore.get_file(), element_id)
|
||||
Data.load(self.file, element_id)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user