mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Minor fix
This commit is contained in:
@@ -108,7 +108,8 @@ class AssignClass(bpy.types.Operator):
|
||||
obj.name = "{}/{}".format(product.is_a(), obj.name)
|
||||
obj.BIMObjectProperties.ifc_definition_id = int(product.id())
|
||||
|
||||
bpy.ops.bim.add_representation(obj=obj.name, context_id=self.context_id)
|
||||
if obj.data:
|
||||
bpy.ops.bim.add_representation(obj=obj.name, context_id=self.context_id)
|
||||
|
||||
if product.is_a("IfcElementType"):
|
||||
self.place_in_types_collection(obj)
|
||||
|
||||
@@ -24,7 +24,7 @@ class Usecase:
|
||||
if related_elements:
|
||||
contained_in_structure[0].RelatedElements = related_elements
|
||||
else:
|
||||
self.file.remove(contained_in_structure)
|
||||
self.file.remove(contained_in_structure[0])
|
||||
|
||||
if contains_elements:
|
||||
related_elements = list(contains_elements[0].RelatedElements)
|
||||
|
||||
Reference in New Issue
Block a user