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