G'day all, please read https://community.osarch.org/discussion/comment/29745/#Comment_29745 regarding a schedule to migrate forum software. Aiming to fully migrate on 15-16 Aug.

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 2025

    @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.