diff --git a/src/ifcconvert/SvgSerializer.cpp b/src/ifcconvert/SvgSerializer.cpp index 7de86250c7..e346e772f4 100644 --- a/src/ifcconvert/SvgSerializer.cpp +++ b/src/ifcconvert/SvgSerializer.cpp @@ -348,7 +348,11 @@ std::string SvgSerializer::nameElement(const IfcSchema::IfcProduct* elem) { if (elem == 0) { return ""; } std::ostringstream oss; const std::string type = elem->is(IfcSchema::Type::IfcBuildingStorey) ? "storey" : "product"; - oss << "id=\"product-" << IfcParse::IfcGlobalId(elem->GlobalId()).formatted() << "\""; + const std::string name = (settings().get(SerializerSettings::USE_ELEMENT_GUIDS) + ? elem->GlobalId() : (settings().get(SerializerSettings::USE_ELEMENT_NAMES) + ? elem->Name() : IfcParse::IfcGlobalId(elem->GlobalId()).formatted())); + + oss << "id=\"" << type << "-" << name << "\""; return oss.str(); }