Hi All,
I am currently using ORD 2021 R1 (10.10.01.03).
Does anyone know if there is an Item Types expression that can be used to determine the "length" of an element in a corridor model?
I thought I might be able to get the value using a System.Math expression and the Start Station and End Station values but that didn't seem to work.
Any ideas/suggestions would be appreciated.
Regards,
Ryan
Hi Ryan,
For template points that become 3D linear elements in the corridor model you can use this.GetElement().LinearElement_Length3d, or if you are seeking a 2D length you can use this.GetElement().LinearElement_Length
Thanks Paul,
Do you know if it is planned to to make available the same level of information on the components/elements as there is currently on the points/3D linear elements in future releases?
It would be ideal if information such as length, corridor name, horizontal name and profile name (which are currently available on the points/3D linear elements) were also available on the components/elements.
is it possible to share a simple model as an example? A problem with civil model is that it's complex internally (with a plenty of relations) and Item Type can be attached on different places, which can lead to different expressions.
Something like a few elements, with attached Item Type with empty expression with explanation "this parameter from this element should be displayed" may help with the analysis, whether the expression can be created or such functionality has to be implemented by Bentley internally.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Item Types - For BeCommunities Question.dgn
Hi Jan,
Please find attached a simple model as an example (the file was created in ORD 10.10.01.03 with no workspace/workset). In the file a barrier template has been used in a corridor to create a barrier element. I have then added Item Types to the element called "Item Type Test". I would like to be able to populate the "Length" Item Type with the length of the barrier element.
Please let me know if you require any additional information. Any help would be appreciated.
I'm not aware of any short term plans for that. Whilst I understand that you would see the length as End Station - Start Station the mesh element itself doesn't carry a length property and it could become confusing if applying clipping to the corridor or other changes that modify the mesh. Something for us to think about though as we expand capabilities for digital engineering requirements.
thanks for the file, that's great there is no workspace/workset dependency.
Unfortunately, I think there is no simple solution available. It's possible to obtain Start and End Stations using these expressions:
this.GetRelatedInstance("OnSameElement:0:MeshSurfaceEntity").MeshSurfaceEntity_StartStation this.GetRelatedInstance("OnSameElement:0:MeshSurfaceEntity").MeshSurfaceEntity_EndStation
but the results are strings, not numbers, so the distance (difference between start and end) cannot be calculated. I do not know ORD well enough, but I guess it's because the station can be formatted text, and not always simple number. Plus, there is no expression available to convert string to number.
It seems that the length (and direction) is available internally, but to analyze, whether this information can be reached from Item Type element, requires perfect knowledge of ORD internal EC data model ... or to play a day or two with expressions and C# code to check all dependencies, whether such information exists in some EC class.
Thanks for looking into this Paul and Jan!