Traverse from IfcEntity to Ifc*Type

Hi All,
some of the models I receive have their Psets attached to the IfcType entity. I need to copy these values to my custom list of P|Qsets and I fail, as they are assigned to IcfType entity, not the IfcElement.
How should I traverse from an instance to a type element using ifcopenshell 0.8.2?

walpa

Comments

  • edited May 8

    @ejs
    you can use

    element_type = ifcopenshell.util.element.get_type(element)
    psets = ifcopenshell.util.element.get_psets(element_type, psets_only=True)
    

    I personally find Quality Control > Debug > Inspector extremely useful too

Sign In or Register to comment.