From 42fedf81c4e49f1cb4f3934a0ed9dd2049fad84b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 11 Apr 2020 14:13:19 +0200 Subject: [PATCH] Add parse_ifcxml to ifcopenshell_wrapper --- src/ifcwrap/IfcParseWrapper.i | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 4f1b457959..f070e2d8f6 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -521,6 +521,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas // The IfcFile* returned by open() is to be freed by SWIG/Python %newobject open; %newobject read; +%newobject parse_ifcxml; %inline %{ IfcParse::IfcFile* open(const std::string& fn) { @@ -528,6 +529,10 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas return f; } + IfcParse::IfcFile* parse_ifcxml(const std::string& fn) { + return IfcParse::parse_ifcxml(fn); + } + IfcParse::IfcFile* read(const std::string& data) { char* copiedData = new char[data.length()]; memcpy(copiedData, data.c_str(), data.length());