diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py index f1aea4f999..23ac329138 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py @@ -30,12 +30,14 @@ FLOAT_TYPE_KEYWORDS = ( ("Time", ("time", "duration")), ) +PROP_VALUE_TYPE = Union[ifcopenshell.entity_instance, float, int, dict[str, "PROP_VALUE_TYPE"]] + def edit_qto( file: ifcopenshell.file, qto: ifcopenshell.entity_instance, name: Optional[str] = None, - properties: Optional[dict[str, Union[ifcopenshell.entity_instance, float, int]]] = None, + properties: Optional[dict[str, PROP_VALUE_TYPE]] = None, pset_template: Optional[ifcopenshell.entity_instance] = None, ) -> None: """Edits a quantity set and its quantities @@ -49,7 +51,7 @@ def edit_qto( One major difference is that quantities set to None are always purged. It is not allowed to have None quantities in IFC. - :param qto: The IfcElementQuantity to edit. + :param qto: The IfcElementQuantity or IfcPhysicalComplexQuantity to edit. :param name: A new name for the quantity set. If no name is specified, the quantity set name is not changed. :param properties: A dictionary of properties. The keys must be a string @@ -64,6 +66,9 @@ def edit_qto( - `int` values will map to IfcQuantityCount. + - dictionary values will be used to create IfcPhysicalComplexQuantity with + properties from the dictionary. + If more control is desired, you may explicitly specify IFC data objects directly. :param pset_template: If a quantity set template is provided, this will be used to determine data types. If no user-defined template is