From 0cbe984c711ecf10498929595f91f87f9181b8fb Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 21 Mar 2018 17:18:38 +0100 Subject: [PATCH] Default to 2x3 for older schemas --- src/ifcparse/IfcParse.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 7bce7adb00..1f2030535b 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -1328,6 +1328,11 @@ void IfcFile::initialize_(IfcParse::IfcSpfStream* s) { } catch (const IfcParse::IfcException& e) { Logger::Error(e); } + + if (schema_ == 0 && schemas.front().substr(0, 4) == "IFC2") { + Logger::Message(Logger::LOG_ERROR, schemas.front() + " not supported, using IFC2X3 instead"); + schema_ = IfcParse::schema_by_name("IFC2X3"); + } } if (schema_ == 0) {