Hi,
even when this question is marked as C# API question, in fact it's about best practices and recommendation and C# was used to create test case only ;-)
Situation
When Parametric solid is created, it's stored as loosely binded elements. When an element is found by its ID, it's not treated as complex element component (because Parametric solid is not Complex Element) and can be modified directly.
It can lead to situation, when the element id is stored, in a meantime it's used to construct parametric solid, and later the element can be removed from DGN model. Such operation is done without any notification, but it leads to parametric solid invalidation and its conversion to a more primitive non parametric geometry.
My question(s)
Is it required to test every element, before it's deleted, whether it belongs to Parametric solid or not? Similarly to test whether an element is complex component (is a member of complex element)?
And when yes, what is the right way? In C++, is it SmartFeatureElement:IsSmartFeature for any element belonging to a parametric solid?
With regards,
Jan
One more question, related to IsSmartFeature() method:
It seems it works (return true) only for root element, that represents the whole Parametric solid.
But how to do such check when general element is retrieved? Standard methods like IsComplexComponent or GetParent do not work, because Parametric solid is not complex element.
I assume there is a way how to obtain root element and to use IsSmartFeature, but it seems I have missed something important in API documentation.
Regards,
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point