# IfcRelDefinesByProperties usage

**URL:** <https://forums.buildingsmart.org/t/ifcreldefinesbyproperties-usage/5521>\
**Category:** Developers\
**Created:** [July 9, 2024, 1:49pm UTC](https://forums.buildingsmart.org/t/ifcreldefinesbyproperties-usage/5521 "2024-07-09T13:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberto.valentini](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@roberto.valentini](https://forums.buildingsmart.org/u/roberto.valentini)\
**Post date:** [July 9, 2024, 1:49pm UTC](https://forums.buildingsmart.org/t/ifcreldefinesbyproperties-usage/5521/1 "2024-07-09T13:49:30Z")

</div>

Hello,  
I want to have an IFC4 file where multiple _PropertySets_ are related to an object via `IfcRelDefinesByProperties`.

I’m able to create a valid file when I add a relation for each property set, but since the attribute `RelatingPropertyDefinition` could also be a `IfcPropertySetDefinitionSet` I am wondering if I can define a single `IfcRelDefinesByProperties` to bind multiple _PropertySets_.

This code seems to be valid

> #100=IFCBUILDINGELEMENTPROXY([…])  
> #101=IFCPROPERTYSET([…]);  
> #102=IFCPROPERTYSET([…]);  
> #103=IFCRELDEFINESBYPROPERTIES(‘id1’,$,$,$,(#100),#101);  
> #104=IFCRELDEFINESBYPROPERTIES(‘id2’,$,$,$,(#100),#102);

but this compact version is not valid

> #200=IFCBUILDINGELEMENTPROXY([…])  
> #201=IFCPROPERTYSET([…]);  
> #202=IFCPROPERTYSET([…]);  
> #203=IFCRELDEFINESBYPROPERTIES(‘id1’,$,$,$,(#200),(#201,#202));

What I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![IFCWebServer](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/ifcwebserver/32/2369_2.png) [@IFCWebServer](https://forums.buildingsmart.org/u/IFCWebServer)\
**Post date:** [July 9, 2024, 6:24pm UTC](https://forums.buildingsmart.org/t/ifcreldefinesbyproperties-usage/5521/2 "2024-07-09T18:24:33Z")

</div>

I think at moment you can assign only one IfcPropertySet.  
The IfcPropertySetDefinitionSet has been added for “upward compatiblity” :

> The sole purpose of this select type is to enable an upward compatible enhancement of the objectified relationship _[IfcRelDefinesByProperties](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRelDefinesByProperties.htm)_ in order to assign multiple _[IfcPropertySet](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertySet.htm)_ 's, _[IfcElementQuantity](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcElementQuantity.htm)_ 's or other subtypes of _[IfcPropertySetDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertySetDefinition.htm)_ to objects using a single instance of _[IfcRelDefinesByProperties](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRelDefinesByProperties.htm)_ .

Which means that such enhancment is planned for future versions of IFC.

---

<div class="post-metadata">

**Author:** ![Evandro](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/evandro/32/1908_2.png) [@Evandro](https://forums.buildingsmart.org/u/Evandro)\
**Post date:** [July 10, 2024, 10:01am UTC](https://forums.buildingsmart.org/t/ifcreldefinesbyproperties-usage/5521/3 "2024-07-10T10:01:50Z")

</div>

Your guess is correct, `IfcPropertySetDefinitionSet` is indeed intended to be used to assign multiple property sets to the same object, using one relationship (as @IFCWebServer pointed out).

The issue seems the serialisation of such _Select_ type in STEP. As per the standard, a Select is serialised by wrapping the value with the class name.

See [steptools.com/stds/step/IS\_final\_p21e3.html#clause-12-1-8](https://www.steptools.com/stds/step/IS_final_p21e3.html#clause-12-1-8) for more examples.
