iLogic: Change of Document units (RAD -> DEG)

iLogic: Change of Document units (RAD -> DEG)

Anonymous
Not applicable
1,678 Views
3 Replies
Message 1 of 4

iLogic: Change of Document units (RAD -> DEG)

Anonymous
Not applicable

Hello,

 

How can i make an External rule with the function of changing the Document Units, Angle from RADIAN to DEGREE?

The reason i want to make this rule is for i have to update files.

 

I'm new in iLogic and have a lot too learn. So hopefully does someone know the code i would have to use.

 

Thanks, Joop

0 Likes
Accepted solutions (1)
1,679 Views
3 Replies
Replies (3)
Message 2 of 4

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @Anonymous 

You're talking about the document settings, right?

degree.PNG

You can change it like this:

ThisApplication.ActiveDocument.UnitsOfMeasure.AngleUnits = UnitsTypeEnum.kDegreeAngleUnits
Message 3 of 4

Anonymous
Not applicable

Hello Jhoel, thanks for the code. It was indeed Units form Document Settings. Now made an Xternal rule so i can use it always.

 

Greetings, Joop

0 Likes
Message 4 of 4

ppolcynBNVFN
Enthusiast
Enthusiast

This was exactly what I was looking for. If you want to change to inches and pounds too you can use the following code:

 

ThisApplication.ActiveDocument.UnitsOfMeasure.LengthUnits = UnitsTypeEnum.kInchLengthUnits
ThisApplication.ActiveDocument.UnitsOfMeasure.MassUnits = UnitsTypeEnum.kLbMassMassUnits
ThisApplication.ActiveDocument.UnitsOfMeasure.AngleUnits = UnitsTypeEnum.kDegreeAngleUnits
0 Likes