diff --git a/src/compas_cadwork/datamodel/element.py b/src/compas_cadwork/datamodel/element.py index 0ab9083..7292305 100644 --- a/src/compas_cadwork/datamodel/element.py +++ b/src/compas_cadwork/datamodel/element.py @@ -13,9 +13,10 @@ from attribute_controller import get_subgroup from attribute_controller import get_group from attribute_controller import get_name -from attribute_controller import get_element_type +from attribute_controller import get_element_grouping_type from utility_controller import get_language from element_controller import get_element_type_description +from element_controller import get_element_type from element_controller import get_active_identifiable_element_ids from element_controller import get_element_cadwork_guid from geometry_controller import get_p1 @@ -100,11 +101,10 @@ def length(self) -> float: @property def group(self) -> str: - return get_group(self.id) - - @property - def subgroup(self) -> str: - return get_subgroup(self.id) + if get_element_grouping_type() == cadwork.element_grouping_type.subgroup: + return get_subgroup(self.id) + else: + return get_group(self.id) @property def ifc_base64_guid(self) -> str: @@ -120,7 +120,7 @@ def ifc_guid(self) -> str: @property def is_wall(self) -> bool: - return get_element_type(self.id).is_wall() + return get_element_type(self.id).is_framed_wall() @classmethod def from_id(cls, element_id: int) -> Element: