Hi all,
I am trying to put together an Item Type Expression using GetRelatedInstance to dig down and retrieve properties of a related object. Does anyone know how i can specifically select an object when there are multiple options,
eg. I currently have the expression below, but want to select the "IA-PC" object. Heres what I have so far:
this.GetRelatedInstance("OnSameElement:0:MeshSurfaceEntity").GetRelatedInstance("Component__Entity_Embedding:1:Corridor").GetRelatedInstance("GeometricContainer__LinearEntityNameSet:0:LinearEntityNameSet").GetRelatedInstance("OnSameElement:0:NamedEntitySetReferencing__NamedEntityReferenced").LinearEntity3d
Note that this is for OpenRoads data, but the concepts should be the same as all PowerPlatform applications I would think.
Regards,
Mark
OpenRoads Designer 2021 R2 (10.10) | Microstation CE Update 17 | ProjectWise CE 3.4
Hi Mark,
Great question, I hope somebody is able to assist with this. In regards to the image in your question, how are you getting that information presented in that format?
Ryan
Hey Ryan,
That is the "Civil Display Browser" interface in ORD. It visually maps the EC relationships of the Civil model to easier understand the links (it took me a while to know what it actually was until recently),
OpenRoads Designer 2022 R3 (10.12) | Microstation 2023 | ProjectWise CE 3.4
Thanks Mark. That is very helpful.
Any ideas?
Mark Shamoun said:Any ideas?
Unfortunately not: Expressions are...
Mark Shamoun said:The "Civil Display Browser" interface in ORD. It visually maps the EC relationships of the Civil model to easier understand the links
Why isn't that tool in vanilla MicroStation? The vertical apps could then use the base tool for their particular relationships.
I have read statements by Bentley staff that Expressions are like SQL. However, anything less like SQL than the expression in your first post is hard to imagine. It's not as if the technology is impossible: look what iTwin technology has to offer!
Perhaps Mangesh.Shelar could comment?
Regards, Jon Summers LA Solutions
What happens to the relationship info when you export or publish to imodel?
Maybe you can leverage ecsql there?
do you have any (preferably small) example of such design? As not regular ORD user, right I have no model with mesh available on my computer. Although Civil Browser is useful often, it does not always show exact EC classes structure, so to compare it with real DGN and (in the best case) model EC dump file, can provide clearer picture of the situation.
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
Sample dgn here with an ORD model that has GetRelatedInstance expressions on the corridor meshes that gets the related corridor they are part of and then finds a related linear feature and gets its length.
Because there are many linear features in the corridor, what we would like to be able to do is somehow select any one of these features specifically by something like a query or even collection index instead of it only selecting the first one.
ord_corridor-getrelatedinstance_test.dgn
As far as i know i would think that relationship info would be retained. I'm not too familiar with ecsql - how could i use that?
Mark Shamoun said:I'm not too familiar with ecsql - how could i use that?
ECSQL is iTwin technology. Unfortunately, it's not available in MicroStation — if only it were available!