To create a closest point constraint with default options
By default, Maya creates the constraint (closestPointOnMesh, closestPointOnSurface, or nearestPointOnCurve) with one locator to represent the input position, and one locator to represent the closest point.
You can view the closest point information in the Attribute Editor. (See View Closest Point constraint result.)
To set options and create a closest point constraint
If you turn on Input Position Locator, the Closest Point Locator is automatically created relative to the origin. For information on adjusting the input locator position, see Edit closest point constraints.
The locator types you selected are created and constrained to the mesh, surface, or curve, and Maya creates a closestPointOnMesh, closestPointOnSurface, or nearestPointOnCurve node. If you selected both locator types, the Input Position locator is created at the origin, and the Closest Point locator is created relative to that point.