From 86c9d7074b33df2b08c9acf6cb1f2f4e604b0533 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 9 Oct 2016 12:44:37 +0200 Subject: [PATCH] Fix traversal of type relationships in IFC4 XML output --- src/ifcconvert/XmlSerializer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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;