Skip to content

How to use IfcRelAggregates to connect two elements and write it to a .ifc file? #2019

@carlblack1987

Description

@carlblack1987

I have wrote a C++ program to export the content to a .ifc file.
I created two entities and they have compose/decompose relations like this:

ENTITY IfcFillerSection
SUBTYPE OF (IfcRailwaySubgradeProfile);
Position : IfcBoolean;
FillerLayers : LIST [1:?] OF IfcFillerLayer;
END_ENTITY;

ENTITY IfcFillerLayer
SUBTYPE OF (IfcRailwaySubgradeProfile);
Position : IfcBoolean;
FillerLayerType : IfcLabel;
FillerType : IfcLabel;
END_ENTITY;

However, someone told me that I shall not define entities in this way. I should use IfcRelAggregates to interpret this kind of one-to-many relation. I googled this entity while I can hardly find any C++ code examples.
So, how should I use the entity IfcRelAggregates to connect two elements (in C++ code) and write this relation to a .ifc file?
Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions