Set unit system before ACIS export

Hi, we wrote a macro which saves every 3DM layer as an ACIS4.0 SAT file for export into Abaqus CAE. We now need to make sure that the units are always millimeters:

  • How do we query the unit system of a current model?
  • How do we change / scale the model automatically to the target unit system before export?

When using the Units keyword for IGES export, Rhino 7 throws a warning when the target unit is different from the model target. But this doesn’t seem to work for ACIS export.

Here is the export script we are using:

# export to SAT file
rs.Command('SelAll')
s2 = '"_ACISExportType={0} _SaveSmall=_Yes _SaveGeometryOnly=_No _SaveTextures=_No _SavePlugInData=_No _UnitSystem={1} _Tolerance={2}"'.format(SAT_Filetype, SAT_Units, SAT_Tolerance)
s1 = '"{0}\{1}.SAT"'.format(SAT_Filepath, layer_list[i])
stringinput = '_-Export {0} {1} _Enter'.format(s1, s2)
rs.Command(stringinput)

Check out rs.UnitScale() and rs.UnitSystem() - they should help you do what you want.