Automatable Information about the Scope for PropertySets

Hi all,

we want to automate the PropertySet assignment to the entities (in an IFC meta model). In the PropertySet XML files there is the ApplicableClasses element. However, only the occurrence entity (e.g. IfcFan) is listed there, never the type entity (e.g. IfcFanType).

In the documentation there is a value from the IfcPropertySetTemplateTypeEnum enumeration, e.g. for Pset_FanTypeCommon, which indicates whether the PropertySet should apply to the occurrence entity, type entity or both. So far, the information is available in the documentation, but cannot be processed automatically. Now we don’t want to manually look up the enumeration value for each PropertySet from the documentation in the browser.

Does this information exist anywhere in an automatable form?

In addition, certain PropertySet names (e.g. Pset_FanTypeCommon) indicate that they apply to the type entity. However, this naming is not at all consistent with the enumeration values in the documentation:

  • Pset_FanOccurrence: PSET_OCCURRENCEDRIVEN → ok
  • Pset_FanCentrifugal: PSET_TYPEDRIVENOVERRIDE → inconsistent name
  • Pset_FanTypeCommon: PSET_TYPEDRIVENOVERRIDE → ok

What is this naming all about?

Thanks for any support!

However, only the occurrence entity (e.g. IfcFan ) is listed there, never the type entity (e.g. IfcFanType ).

Note that this is fixed in IFC 4.3. However, it won’t help you if you’re on IFC4, or even worse, IFC2X3 which doesn’t specify the type constraints :slight_smile:

The IfcOpenShell Utility module can help determine which psets are applicable to which classes. There is explicit code that handles the complexities of it here: IfcOpenShell/pset.py at v0.7.0 · IfcOpenShell/IfcOpenShell · GitHub so you can do things like is_applicable or get_applicable.

It actually uses the IFC serialisation of psets, not XML, so you can get the templates as editable definitions in a project library.

These may help (though the 2X3 generation probably needs a bit of an upgrade since the first attempt ages ago):

Note that the other way around, type to entity is generated. See more here: IfcOpenShell/type.py at v0.7.0 · IfcOpenShell/IfcOpenShell · GitHub - but you’d be after entity_to_type anyway.

However, this naming is not at all consistent

Known issue still present in IFC4.3 and will probably be addressed, not sure the priority though.

Thanks for support, @Moult!

We have now seen that there is a templatetype attribute in the PSet XML files with the enum value.