How can I get the origin (X, Y & Z coordinates) of a component?

I need to locate the origin of a component using C#. I though about using bounding box but that is not close enough. Is there an easy way to get these coordinates?

SolidworksApi macros