diff --git a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi index 6349f7d8ce..482a558dc7 100644 --- a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi +++ b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi @@ -878,7 +878,18 @@ class file: """Internal IfcFile pointer address.""" ... - def getInverse(self, instance_id, type, attribute_index): ... + def get_inverses_by_declaration( + self, instance_id: int, type: declaration, attribute_index: int + ) -> tuple[entity_instance, ...]: + """Get instance inverses of the particular type defined by ``declaration``. + + :param declaration: Type of inverses to find. + Supertypes are also supported - e.g. 'IfcRoot' will also include all 'IfcRelationship' inverses. + :param attribute_index: Find references only from the provided attribute index. + Could be set to ``-1`` to consider all attributes. + """ + ... + def getMaxId(self): ... def get_total_inverses_by_id(self, instance_id: int) -> int: ... def getUnit(self, unit_type): ... diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 6b738b2b7a..bc2b3105e4 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -51,6 +51,7 @@ private: %rename("by_id") instance_by_id; %rename("by_type") instances_by_type; %rename("by_type_excl_subtypes") instances_by_type_excl_subtypes; +%rename("get_inverses_by_declaration") getInverse; %rename("get_total_inverses_by_id") getTotalInverses; %rename("entity_instance") IfcBaseClass; %rename("file") IfcFile;