We are developing Add-in using SolidWorks 2019. With this Add-in we have inserted macro feature. The macro feature contains a wire body of the curve (i.e. line, circle or ellipse) as an output geometry.
The annotation (i.e. note) is inserted into the part and attached to the edge of that wire body using IAnnotation::ISetAttachedEntities() method. Also, the annotation and leader attachment point is set.
Now if we interactively delete that macro feature, then the annotation does not enter into the dangling state. Why?
Another observation is if we interactively attach any other note to this macro feature and delete that feature, then that new note becomes dangling but not the previous one attached through code. Why such behavior from SolidWorks?
Please find the sample application in c++ (Sample Application1.zip) attached here.
1) I have inserted macro feature in OnWireBodyCreateCallback() using IFeatureManager::IInsertMacroFeature3() method.
2) I have created a circular curve in CMacroFeatureBuilder::Regenerate() callback and created wire body from that as output geometry of macro feature.
3) In the regenerate callback, I have attached that circular curve to the inserted note and also set the attachment point of annotation and leader.
Thanks and Regards,