Skip to content

Commit 8c89ea8

Browse files
committed
reports
1 parent 9f01f86 commit 8c89ea8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

add_ifc_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def set_ifc_property(self, context, property_name):
2020
# Get the active IFC file
2121
ifc_file = IfcStore.get_file()
2222
if not ifc_file:
23-
print("No IFC file found. Ensure you're working in a Bonsai project.")
23+
self.report({'ERROR'}, "No IFC file found. Ensure you're working in a Bonsai project.")
2424
return
2525

2626
# Loop through all selected objects
@@ -43,7 +43,7 @@ def set_ifc_property(self, context, property_name):
4343
}
4444
ifcopenshell.api.run("pset.edit_pset", ifc_file, pset=pset, properties=new_values)
4545
except:
46-
print("Bonsai is not installed. Good for you.")
46+
self.report({'ERROR'}, "Bonsai is not installed. Good for you.")
4747

4848
class SetIfcPropForGroup(bpy.types.Operator):
4949
"""Set custom ifc property for grouping"""

upgrade_to_IFC4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def upgrade_IFC4(self, context):
99
# Get the active IFC file
1010
ifc_file = IfcStore.get_file()
1111
if not ifc_file:
12-
print("No IFC file found. Ensure you're working in a Bonsai project.")
12+
self.report({'ERROR'}, "No IFC file found. Ensure you're working in a Bonsai project.")
1313
return
1414
ifc_file.upgrade("IFC4")
1515

0 commit comments

Comments
 (0)