diff --git a/src/ifcconvert/XmlSerializer.cpp b/src/ifcconvert/XmlSerializer.cpp index 5ec20d2448..c4eb47259d 100644 --- a/src/ifcconvert/XmlSerializer.cpp +++ b/src/ifcconvert/XmlSerializer.cpp @@ -223,9 +223,15 @@ ptree& descend(IfcObjectDefinition* product, ptree& tree) { } } +#ifdef USE_IFC4 + IfcTypeObject::list::ptr types = get_related + + (object, &IfcObject::IsTypedBy, &IfcRelDefinesByType::RelatingType); +#else IfcTypeObject::list::ptr types = get_related (object, &IfcObject::IsDefinedBy, &IfcRelDefinesByType::RelatingType); +#endif for (IfcTypeObject::list::it it = types->begin(); it != types->end(); ++it) { IfcTypeObject* type = *it;