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
Any feedback in how to select one specific object instead the first one?
ORD 2022R3 ORDL 2022R3 LumenRT 16.17.59.94 Synchro 06.05.01.05
dominic SEAH said:What happens to the relationship info when you export or publish to imodel?
Mark is (more or less) right, but complete answer is not (and cannot be) simple, because the publishing process is a transformation between two different worlds. Even when EC data in PowerPlatform and in iModel are "only" another versions of the same technology, there are plenty of structural changes and some features can be persisted in different way. So it depends on the transformation process, how specific relationship is transformed.
dominic SEAH said:Maybe you can leverage ecsql there?
Yes, ECSQL is one from core features of iTwin.js / iModel ecosystem. But, depending how data are transformed, the query is different in PowerPlatform and iModel, both because different query mechanism (ECQuery vs ECSQ) and data structure is probably different.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
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!
Regards, Jon Summers LA Solutions
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?
OpenRoads Designer 2022 R3 (10.12) | Microstation 2023 | ProjectWise CE 3.4
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
Hi Mark,
Mark Shamoun said:Any ideas?
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.
What happens to the relationship info when you export or publish to imodel?
Maybe you can leverage ecsql there?
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?
Any ideas?
Thanks Mark. That is very helpful.