A3DAsmModelFileGetUnit
-
A3DStatus
A3DAsmModelFileGetUnit(const A3DAsmModelFile *pModelFile, A3DDouble *pdUnit) Retrieves the unit a model file should be displayed with.
Behavior
When
A3DAsmModelFileGetUnitfinds a suitable unit in the provided model file,pdUnitis filled with a floating-point decimal representation of this unit, as stated inembed:rst:inline :doc:`/guide/units`
.
pdUnitcan then be converted intoA3DEUnitsusingA3DUnitGetFromEnum().The unit of an entire model file depends on the value of the
m_bUnitFromCADfield, either inA3DAsmModelFileDataor A3DAsmProductOccurenceData.A3DAsmModelFileGetUnitrecursively traverses the model file given bypModelFileand stops on the first entity (model file or product occurrence) wherem_bUnitFromCADis A3D_TRUE. Them_dUnitfield of this entity is then written inpdUnit.- If
pdUnitis 0, the function returnsA3D_INVALID_DATA_NULL - If
pModelFileis 0, the function returnsA3D_SUCCESSand*pdUnitis set to 0.0.
The traversal may complete without finding any unit. In this case, the function returns
A3D_ERROR.- If