Topsolid online Help Index
By default, values are always input and output in reference units : angles in degrees, lengths in meters.
It is possible to change this behavior with the ProgramUnitAngle and ProgramUnitLength properties of the IApplication interface (ex: Setting program units).
It is also possible to define program units associated to a given document (by default, when a document is first accessed through Automation, it inherits the application program units) by the ProgramUnitAngle and ProgramUnitLength properties of the IDocument interface.
Whenever you send or receive values to or from objects belonging to a given document, the program units of this document are used, unless explicitly specified in the description of the method/property.
Usually, most programs will only set the application program units once at the beginning, and forget about it.
However, there is one case where one should be careful : if several Automation client programs are supposed to run in parallel on the same TopSolid instance, one of them may change the program units to a setting that would not please another one...
In this case, checking for correct program units is needed before performing actions that would involve exchanging values with TopSolid.
Topsolid online Help Index