Can't select items in feature tree after running macro.

Hi again All,

I'm having a general issue when running a macro. This macro edits a preselected coordinate system feature that can be either in the context of an assembly or in the context of a component within an assembly. My philosophy for gathering the entities with GetCorresponding() mimics the following thread:

 

Now, my issue is that when I run the macro with coordinate systems selected at the assembly level, everything is good; however, if selected coordinate systems are edited at the component level, something is left hanging. I am unable to select any items in the feature tree once the macro has finished. I'm not sure what operation would cause this, and wanted to see if anyone else had similar experiences and what they did to resolve it. At this point, I have to close the model and reopen it to fix this. I have searched the forums and can't seem to find a similar problem.

Thanks in advance,

Austin

SolidworksApi/macros