GetDefaultUnit

Returns the default unit for a physical quantity.

UI Access

Tools > Options > General Options > Default Units. Note that this menu only displays units that can be changed, while the script can be used to view additional default units.

Parameters
Name Type Description
<type> String

String containing a type of measurement.

Valid strings are (case insensitive):

  • "Acceleration"
  • "Angle"
  • "AngularAcceleration"
  • "AngularDamping"
  • "AngularSpeed"
  • "Capacitance"
  • "Conductance"
  • "Current"
  • "CurrentChangeRate"
  • "DataRate"
  • "DeltaH" (Magnetic Field Strength)
  • "Density"
  • "Flux"
  • "Force"
  • "Frequency"
  • "Inductance"
  • "Length"
  • "MagneticReluctance"
  • "Mass"
  • "MassFlowRate"
  • "MomentInertia"
  • "Power"
  • "Pressure"
  • "PressureCoefficient"
  • "Resistance"
  • "SaturateMagnetization" (Magnetic Inductance)
  • "Speed"
  • "Temperature"
  • "Time"
  • "Torque"
  • "Voltage"
  • "VoltageChangeRate"
  • "Volume"
  • "VolumeFlowPerPressureRoot"
  • "VolumeFlowRate"
Return Value

String containing the default unit (for example, "mm").

Python Syntax GetDefaultUnit(<type>)
Python Example

oDesktop.GetDefaultUnit("Length")