diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 472cbc8c1e..96aafd6237 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -90,7 +90,9 @@ private: %extend IfcUtil::IfcBaseClass { int get_attribute_category(const std::string& name) const { - if (IfcSchema::Type::IsSimple($self->type())) return -1; + if (IfcSchema::Type::IsSimple($self->type())) { + return name == "wrappedValue"; + } IfcUtil::IfcBaseEntity* self_ = (IfcUtil::IfcBaseEntity*) self; const std::vector names = self_->getAttributeNames(); if (std::find(names.begin(), names.end(), name) != names.end()) { diff --git a/test/tests.py b/test/tests.py index 256ed3b8b9..a755df6f9f 100644 --- a/test/tests.py +++ b/test/tests.py @@ -41,6 +41,8 @@ assert f[16] in f.get_inverse(f[15]) assert f[16].UnitComponent is not None f.remove(f[15]) assert f[16].UnitComponent is None +prop = f.by_type("IfcPropertySingleValue")[0] +assert prop.NominalValue.wrappedValuex in str(prop) # Some operations on ifcopenshell.entity_instance assert f[22].Id == ''