From a1e51757b1875fcccb7ac346c564dc57db5c3c22 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 6 Sep 2024 14:06:05 +0500 Subject: [PATCH] attribute.edit_attributes - document behaviour for PredefinedType --- .../ifcopenshell/api/attribute/edit_attributes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py index 3babb19013..00f96c4c1d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py +++ b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py @@ -29,6 +29,13 @@ def edit_attributes(file: ifcopenshell.file, product: ifcopenshell.entity_instan to also ensure that ownership history is updated. This function provides that convenience. + The method will maintain consistency for PredefinedType attribute + based on whether ElementType/ObjectType and whether occurrence is typed: + + - PredefinedType and ObjectType to be `None` if occurrence is typed + - PredefinedType to be "NOTDEFINED" if ElementType/ObjectType is None + - PredefinedType to be "USERDEFINED" if ElementType/ObjectType is not None + :param product: The product you want to edit. This may be any rooted IFC entity. :type product: ifcopenshell.entity_instance