API to custom properties (quantities)??

Someone knows of a macro that create a customproperty in all the components open?. That property need to be the quantity of each component (part or assembly). This quantity is showed in the bill material, but i don´t know how to link that with the custom property quantity of each part or asembly. I need that to put automatic the quantity property in the box drawing of each part or assembly.

THANKS¡¡¡¡¡

SolidworksApi macros