Hi folks,I want to specifically select an Element of a Parametric Solid.As example I have this Parametric Solid:Now I want the Element behind "Profile #1" that was used for the Extrusion. I have no problems to get all 5 Profiles but I have no Information which Element belongs to which feature. I also have no issues to find the list of all features but I can't make the connection. From a feature and from an Element, I only find back to the root Element. In the list of all Profiles, its the first Element but only when I didn't replaced it. I've looked at the EC Objects Values but didn't saw any connection between the features and the actual Elements. Thanks in advance.
Hi J-P,
I am not sure if and how this information is exposed in NET API, but for sure the relationship between parametric operation and input element(s) is expressed using EC relationship classes, so it can be tracked analysing ECQuery results.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,I've looked into everything. "IECRelationshipInstance of Class OnSameElement" doesn't contains any values. I'm not sure where I should find it or for what Names I should look out for. I've looked at everything in the Debugger and found nothing that would look like it would help but to be fair, there are lot of values.The native API is also an option.
Mit freundlichen Grüßen / Best regardsJean-Pierre Hundhausen
| AB_DATE Engineering Software | ab-date.de |
HI J-P,
Jean-Pierre Hundhausen said:I've looked at everything in the Debugger and found nothing that would look like it would help but to be fair, there are lot of values.
If I remember right, debugger is not always the right tool, because when ECQuery is not configured right, it does return proper EC classes.
Jean-Pierre Hundhausen said:I've looked into everything. "IECRelationshipInstance of Class OnSameElement" doesn't contains any values.
Unforutnately I have no example available, but what I see in EC data dump, it's should be represented using LeafElementToSmartFeatureElementRelationship relationship, but it is backward relationship. Because not everything is saved into the dump file, maybe there is also some forward relationship available.
My experience is that to search for relationship classes is tricky a bit, you should (I guess) create QueryRelatedClassSpecifier and RelatedInstanceSelectCriteria to find them. I remember in the past, based on question, some hints and code snippets were shared by Bentley team in this forum.
Jean-Pierre Hundhausen said:The native API is also an option.
You can try to check ConstraintCommonNET.dll assembly, where parametric solids (SmartFeature) API is published. I am not sure whether it allows to iterate the content, but maybe you find something useful.
Hi Jan,I ended up using the native "SmartFeatureAPI". The "ConstraintCommonNET.dll" didn't had much options that would help me but from there I found the native API. From there it was just extracting the Tree and going trough all children. This feels way more natural handling with Parametric Solids, than I'm doing it in C#.