Hello,
I don't know this is the correct place to post this as expressions in item types are still 'technology preview' (?) but I give it a try anyhow.
I played with expressions in item type properties and defined an expression for 05-diameter as this.GetElement().PrimaryAxis*2
This works - but as you can see in the attached screenshot the value I get is not correctly represented in the properties pane: I get 40000000.000cm where the primary axis is 20.000cm and so PrimaryAxis*2 should be 40.000cm.
Strange thing is when I attach a field the respresentation in the field is correct: diameter 400 (I defined this as mm).
Luc Dierick
Belgium
Did you saw this:
communities.bentley.com/.../ce-expressions-in-item-type-properties
Regards
Frank
since 1985: GIS, CAD, Engineering (Civil) Senior Consultant : [Autodesk Civil 3D , Esri ArcGIS, VertiGIS: in previous days : Bentley MS V4 - V8i, GeoGraphics, Bentley Map V8i, InRoads, HHK Geograf, IBr DAVID] : Dev: [C, C++, .NET, Java, SQL, FORTRAN, UML][direct quote by: http://en.wikipedia.org/wiki/Helmut_Schmidt]: "Wer Kritik übel nimmt, hat etwas zu verbergen"Wer Grammatik- und/oder Rechtschreibfehler findet, der darf sie behalten :-)
Hi Luc,
EC Expression are executed with base unit values(UOR's) and thus it will shows result without applying any unit formatter. When you use these value in texts fields or reports, these features applies unit formatter explicitly and values are shown correctly.
It looks like, property pane is not applying any formatter on items properties having expression and thus failed to show correct value. It seems that there is issue and I will look into this. TFS 1012294 is filed against it. Currently, as a workaround, if you want to use expression with units, then you can use conversion factor of 100 in expression "this.GetElement().PrimaryAxis/100*2" with intermediate property "PrimaryAxis" and then use this property in "Diameter" with "this.PrimaryAxis" expression.
Sanjivani Ichake said:TFS 1012294 is filed against it
What's a TFS? That's the first time I've seen that acronym on Be Communities.
Regards, Jon Summers LA Solutions
TFS is Bentleys Defect database, the number is the Defect Number within that database. For future correspondence please refer to as Defect 1012294.
Thanks.
Carl Myhill
Technical Support Engineer
Bentley Systems