From 7a974e7063cbe4fae1c9e5a4d04c3189c1037be0 Mon Sep 17 00:00:00 2001 From: Licini Date: Tue, 20 Aug 2024 15:12:34 +0200 Subject: [PATCH] fix print_properties --- src/compas_ifc/entities/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compas_ifc/entities/base.py b/src/compas_ifc/entities/base.py index 48daa8c..26e3f2c 100644 --- a/src/compas_ifc/entities/base.py +++ b/src/compas_ifc/entities/base.py @@ -248,7 +248,7 @@ def add_entity(entity, parent_node): print(spatial_tree.get_hierarchy_string(max_depth=max_depth)) print("") - def print_properties(self): + def print_properties(self, max_depth=2): IfcObject = getattr(importlib.import_module(f"compas_ifc.entities.generated.{self.schema}"), "IfcObject") if not isinstance(self, IfcObject): @@ -271,7 +271,7 @@ def add_property(item, parent_node): add_property(self.properties, root) print("=" * 80 + "\n" + f"Properties of {self}\n" + "=" * 80) - tree.print_hierarchy() + print(tree.get_hierarchy_string(max_depth=max_depth)) print("") def show(self):