If I have two assemblies open in SW, lets call them
Wrong.sldasm and Proper.sldasm.
Proper have a feature named ProperFeature
Now I unfortunately make Wrong.sldasm to my active model
swModel = (ModelDoc2)swApp.ActiveDoc;
When I subsequently try to select ProperFeature, and suppress it with
swModel.Extension.SelectByID2("ProperFeature", "COMPONENT", 0, 0, 0, false, 0, null, 0))
The feature in Proper.sldasm get selected even though its not Active and not referenced by swModel. This is completely illogical.
When I then try to suppress this feature, this trigger an Exception, because nothing is selected in the active model
swModel.EditSuppress2();
Can anyone suggest a workaround for this problem where SelectByID jumps the fence?
Best Regards
/Magnus
SolidworksApi macros