diff --git a/src/bonsai/bonsai/bim/module/spatial/prop.py b/src/bonsai/bonsai/bim/module/spatial/prop.py index 910bb2e28c..4041821366 100644 --- a/src/bonsai/bonsai/bim/module/spatial/prop.py +++ b/src/bonsai/bonsai/bim/module/spatial/prop.py @@ -268,14 +268,12 @@ class BIMSpatialDecompositionProperties(PropertyGroup): should_include_children: bool @property - def active_container(self): - if self.containers and self.active_container_index < len(self.containers): - return self.containers[self.active_container_index] + def active_container(self) -> Union[BIMContainer, None]: + return tool.Blender.get_active_uilist_element(self.containers, self.active_container_index) @property - def active_element(self): - if self.elements and self.active_element_index < len(self.elements): - return self.elements[self.active_element_index] + def active_element(self) -> Union[Element, None]: + return tool.Blender.get_active_uilist_element(self.elements, self.active_element_index) class BIMGridProperties(PropertyGroup): diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py index ad44cede8d..96a3b130be 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py @@ -43,15 +43,11 @@ def create_entity( operation type but many people forget. :param ifc_class: Any rooted IFC class. - :type ifc_class: str,optional :param predefined_type: Any built-in or user-defined predefined type that is applicable to that IFC class. For user-defined predefined types just enter in any value and the API will handle it automatically. - :type predefined_type: str,optional :param name: The name of the new element. - :type name: str,optional :return: The newly created element based on the specified IFC class. - :rtype: ifcopenshell.entity_instance Example: