From b3f581d78d12874435a90531c9b2965a20b469e9 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 14 Feb 2021 17:22:15 +0100 Subject: [PATCH] Handle boxed enum creation in Python --- src/ifcwrap/IfcParseWrapper.i | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 075ac2edfe..4bc5301c8c 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -68,6 +68,9 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas } } else if (inst->declaration().as_type_declaration() && i == 0) { pt = inst->declaration().as_type_declaration()->declared_type(); + } else if (inst->declaration().as_enumeration_type() && i == 0) { + // Enumeration is always from string in Python + return IfcUtil::Argument_STRING; } if (pt == 0) {