From 151244ae79fedc16d676cac9a588fef7e2364712 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 2 Sep 2024 14:38:23 +0500 Subject: [PATCH] ifcopenshell.file() to create valid ifc header by default #5246 Valid type for author and organization is 'LIST [ 1 : ? ] OF STRING (256)' --- src/ifcparse/IfcParse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 3ba0ec0ed5..298295e6a2 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -2201,7 +2201,7 @@ void IfcFile::setDefaultHeaderValues() { const std::string empty_string; std::vector file_description; std::vector schema_identifiers; - std::vector empty_vector; + std::vector string_vector = {""}; file_description.push_back("ViewDefinition [CoordinationView]"); if (schema() != nullptr) { @@ -2213,8 +2213,8 @@ void IfcFile::setDefaultHeaderValues() { header().file_name().name(empty_string); header().file_name().time_stamp(createTimestamp()); - header().file_name().author(empty_vector); - header().file_name().organization(empty_vector); + header().file_name().author(string_vector); + header().file_name().organization(string_vector); header().file_name().preprocessor_version("IfcOpenShell " IFCOPENSHELL_VERSION); header().file_name().originating_system("IfcOpenShell " IFCOPENSHELL_VERSION); header().file_name().authorization(empty_string);