API for distance constraint

Which API Should be used to add a constaint between two entities with distance as constraint?

SolidworksApi macros