BIMserver icon indicating copy to clipboard operation
BIMserver copied to clipboard

IfcValue

Open PavelWhiteTiger opened this issue 2 years ago • 2 comments

How i can add IfcValue (IfcPositiveLengthMeasure, IfcLengthMeasure) in BendingParameters? When i try create IfcLengthMeasure, bimServer writes "Invalid cid".

Example: { var instance = Ifc4Factory.eINSTANCE; var ifcLengthMeasure = instance.createIfcLengthMeasure(); ifcLengthMeasure.setWrappedValue(Double.parseDouble((String) o)); meshType.getBendingParameters().add(param); }

model.getClient().getMetaDataManager().getPackageMetaData("ifc4").getEClass("IfcPositiveLengthMeasure") doesn't work too

PavelWhiteTiger avatar Dec 18 '23 11:12 PavelWhiteTiger

Could you post the stacktrace? "doesn't work" is not very specific. Also, your code also does not show what's in the param variable. Are you using the Java client with the recordChanges option set to true?

hlg avatar Jan 10 '24 17:01 hlg

"Invalid cid" is only reported when CID is -1, which is the case for an OID of -1.

I think this is related to #1254 and #1225.

Just like IfcPropertyListValue.ListValues in #1254, IfcReinforcingMeshType.BendingParameters provides another example of defined type attributes with higher multiplicity and low level methods not yet supporting this case properly.

Just like #1225, this seems to appear with the Java client and its experimental use of the low level calls.

It would be great to expand this into a full consistent test case for when we have time to work on the low level interfaces.

hlg avatar Nov 27 '24 18:11 hlg