How to apply apperances

How to apply apperances to all bodies in part or to all components in assy.

SolidworksApi macros