How can I change the Angle units (radian/degree) in Mechanical using Scripting?
Works only till version 2021R1, for versions 2021R2 use the Pythonic method above.
The following jscript snippet works:
For degrees:
degrees
cmd = """DS.Script.doSelectDegrees();""" ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(cmd)
For radians:
radians
cmd = """DS.Script.doSelectRadians();""" ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(cmd)
Pythonic way :
ExtAPI.Application.ActiveAngleUnit = AngleUnitType.Radian
ExtAPI.Application.ActiveAngleUnit = AngleUnitType.Degree