From 3245d0af5cbddfe92162e7813e5f1cdb78ddf79c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 28 Aug 2025 11:15:18 +0200 Subject: [PATCH] Serialization of header entities with #0= --- src/ifcparse/IfcParse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 7b85aa11ea..a2cd9ba3de 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -976,7 +976,7 @@ namespace { data_ << "." << i.value() << "."; } void operator()(const IfcUtil::IfcBaseClass* const& i) { - if (i->declaration().as_entity() == nullptr) { + if (i->declaration().as_entity() == nullptr || i->declaration().schema() == &Header_section_schema::get_schema()) { i->toString(data_, upper_); } else { data_ << "#" << i->id(); @@ -2714,7 +2714,7 @@ AttributeValue IfcUtil::IfcBaseClass::get_attribute_value(size_t index) const { void IfcUtil::IfcBaseClass::toString(std::ostream& out, bool upper) const { const auto *ent = declaration().as_entity(); - if (ent != nullptr) { + if (ent != nullptr && declaration().schema() != &Header_section_schema::get_schema()) { out << "#" << as()->id() << "="; } if (upper) {