Closed EVersluys closed 9 years ago
The type of the NominalValue property of IfcPropertySingleValue is IfcValue. IfcValue is a "Select" type, which means it can be any subtype of IfcValue. BIMserver needs to know the exact type of the value you are trying to set. To provide BIMserver with this information, you need to call setWrappedStringAttribute, which has 1 extra argument compared to setStringAttribute, and that is the type.
Thank you. It worked.
Trying to change a value of an ifcproperty. I am able to change the fieldname string value. Also to read the nominalvalue by Bimsie1LowLevelInterface.getStringAttribute.
But cannot change the NominalValue. What am I doing wrong?
Request:
"request": { "interface": "Bimsie1LowLevelInterface", "method": "setStringAttribute", "parameters": { "tid": "7", "oid": "516948484", "attributeName": "NominalValue", "value": "125"
At commit transaction I get:
"__type": "UserException", "message": "No attribute with the name \"NominalValue\" found in class \"IfcPropertySingleValue\""
Output of Bimsie1LowLevelInterface.getDataObjectByOid:
{ "response": { "result": { "__type": "SDataObject", "guid": "", "name": "", "oid": 516948484, "rid": 0, "type": "IfcPropertySingleValue", "values": [ { "__type": "SSimpleDataValue", "fieldName": "Name", "oid": -1, "rid": 0, "stringValue": "Vnr" }, { "__type": "SSimpleDataValue", "fieldName": "Description", "oid": -1, "rid": 0, "stringValue": null }, { "__type": "SListDataValue", "fieldName": "PropertyForDependance", "oid": -1, "rid": 0, "values": [] }, { "__type": "SListDataValue", "fieldName": "PropertyDependsOn", "oid": -1, "rid": 0, "values": [] }, { "__type": "SListDataValue", "fieldName": "PartOfComplex", "oid": -1, "rid": 0, "values": [] }, { "__type": "SSimpleDataValue", "fieldName": "NominalValue", "oid": -1, "rid": 0, "stringValue": "121" } ] } } }