How can I get the length unit name of STEP model?

  1. FAQ
  2. »
  3. STEP

The values of unit names can be accessed from OdAPFile instance (which is a database for STEP model) using OdDAI::OdUnitConverter class:

OdAPFilePtr pAPFile = pDatabase;
OdDAI::OdUnitConverterPtr unitConverter = pDatabase->getUnitConverter();
OdAnsiString unitName, unitPrefix;
unitConverter->getConversionUnitName("length_unit", unitName, unitPrefix); // "METRE", "MILLI"