Can i please get a macro for inserting a part(derived part) to a new a part?

I want to do a feature that is "insert part" into a new part document and insert a library feature to that is i have my own library feature . for all this i need a macro.?

SolidworksApi macros