How to prevent a macrofeature from rebuilding?

Hi,

I implemented a macrofeature into an assembly (SubAsm) and every time the feature rebuilds, the macro performs some helpful actions. So far so good.

When the assembly (SubAsm) is another assembly (ASM) the macro starts after each rebuilding.  This isn't really useful. Esepecially when there are many SubAsm's in one Assembly the macro.

Is there a way of preventing the macrofeature of rebuilding when the SubAsm is in another assembly ?

Thanks

SolidworksApi macros