external references to locked macro

Has anyone created a macro that will iterate through an assembly/sub-assemblies and turn all external references to locked?  For some reason I recall a discussion about this a long time ago but I'm unable to find the discussion.

SolidworksApi macros