How do I create the offset the sketch profile in API

Could anybody can give me the code for the attach sketch entity.

Or guideline how to create the code.

SolidworksApi macros