Macro which add assembly name as c. property into parts in this assembly

Hello every one,

I and my coworker are trying to "write" macro which will add as a custom property name of main assembly into parts inserted in the main assembly - see screenshot for better understanding (my english is not so good). Name of the custom property in parts should be "KAM". We trying use and modify macro from this page , but withouth any success. Can anyone to help us?

SolidworksApi/macros