How to create a reference feature from geometric object?

For example, I want to create a reference point at a particular position with coords (x,y,z), or create a reference axis from a curve object, or create a reference plane from a surface object. How to implement this through the API?

SolidworksApi macros