The Mechanical application has a user defined unit system in the UI that can be changed, but there are many other units to be aware of when using the API.
There is the user-specified current system of the application (UI):
UILenUnit=DataModel.CurrentUnitFromQuantityName("Length")
The GeoData unit for any internal CAD data like centroids of bodies, edge lengths, face areas, etc...
GeoLenUnit = ExtAPI.DataModel.GeoData.Unit
And any MeshData you work with (i.e. node locations, elem. centroids)
MeshLenUnit=ExtAPI.DataModel.MeshDataByName("Global").Unit
The internal Graphics generator (creation of custom lines, arrows boxes, etc...)
ExtAPI.Graphics.Unit
you can import the "units" module (built in to the API environment) for easy units conversion.