GetUnitSystem

Returns the unit system of the solution. You can call this function on the initializing level.

This method takes a name of a function or functionality as argument and returns a void pointer that is then cast to a function pointer of a given access method.
bool GetUnitSystem ()

You can find a definition of this function and the definition of UnitSystem enum in the CaeUtils_Exp_IContext.hxx header file.

Note:

To access this method, you must use the GetTMGFunction method and include the AdditionalFunctions.h file located in the [installation_path]\tmg\include\maya\expeval_utils folder in the beginning of your source file.

Example:

typedef int (*GETTMGUNITSYSTEM_FTYPE)();
GETTMGUNITSYSTEM_FTYPE pGetTMGUnitSystem = nullptr;
if (pGetTMGUnitSystem != nullptr)
{
    int unitSystem = (*pGetTMGUnitSystem)();
}