Inventor API: Updating sketch entities when sketch is already used in feature

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello;
My question is about the Inventor API: how can I update the content of a sketch (entities & constraints) using the API while the sketch itself is already used in a feature? Going through the interface, I can easily open up a loft or an extrusion, start editing its sketch, and replace e.g. an arc segment by a line segment to alter the profile. However, through the API, trying to delete old sketch entities or add new entities to the sketch before deleting the old ones either fails with an HR code that I cannot comprehend, or Inventor just crashes/hangs on resolving the part (with an empty error message box...?).
I understand how feature parameters can be updated (e.g. the distance of an extrusion or the angle of a draft) and I can do that fine, but updating the sketches seems a lot more complicated. I suspect I might have to recreate profiles each time sketches require modifications and update the features with these new profiles, but why would the sketch itself seem 'locked' through the API? I have tried encompassing the modfication calls between 'Edit'/'ExitEdit' and EndOfPart barriers, to no avail.
Is there a sample somewhere that I have missed?
FYI, I am programming an addin in C++ through COM interfaces.