hole and slot ordinate dimension

hole ordinate dimensioning

slot ordinate dimensioning

It has done with macros?

SolidworksApi macros