Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: fullevent

Hi @fullevent.  I am working on other stuff right now, so no time for testing on attached files, but a couple ideas come to mind that may help in this process.  Instead of getting all curves from the view, then working backwards, trying to figure out which feature in the model is responsible for them, try doing it the other way around.  When you use the DrawingView.DrawingCurves property, specify the MarkFeature as the 'model object' to input.  Then you should get all the view geometry belonging to that feature in one DrawingCurvesEnumerator.  Another thing to keep in mind is 'context' (or edit mode, if that makes more sense).  If the view is a flat pattern view, then the context of the model geometry associated with the 2D curves in that view will be in the flat pattern mode of the model file.  I'm not sure if you are aware of this or not, but the FlatPattern object is derived from the ComponentDefinition, so it is capable of having its own, separate set of parameters, features, and other such things.  When in 'folded' mode, you will not even see the parameters defined within the FlatPattern available within the Parameters dialog.  So, you may need to transition from scope of the FlatPattern into the 'folded' scope, before you can access the feature that was defined within the 'folded' mode.  If the feature was added in 'flat pattern' mode, then it would not be available in the 'folded' mode...unless you used fold/unfold features in the process, or something odd like that, maybe.  Just some food for thought.

Edit:  I should probably add this link in here too, to avoid confusion, because the 'folded' model of a sheet metal part is in the SheetMetalComponentDefinition (which is derived from the PartComponentDefinition, but is further customized for sheet metal stuff).  To get access to that type of 'definition', create a variable of that Type, then set the variable's value using the PartDocument.ComponentDefinition property, which just says that it returns a normal PartComponentDefinition, in the documentation.  But you will get the SheetMetalComponentDefinition type instead.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)