diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index f84edee777..691a6b0118 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -271,7 +271,12 @@ public: IfcWriteArgument::operator int() const { return as(); } IfcWriteArgument::operator bool() const { return as(); } IfcWriteArgument::operator double() const { return as(); } -IfcWriteArgument::operator std::string() const { return as(); } +IfcWriteArgument::operator std::string() const { + if (argumentType() == argument_type_enumeration) { + return as().enumeration_value; + } + return as(); +} IfcWriteArgument::operator std::vector() const { return as >(); } IfcWriteArgument::operator std::vector() const { return as >(); } IfcWriteArgument::operator std::vector() const { return as >(); }