TheSwamp

Code Red => .NET => Topic started by: rugaroo on July 15, 2017, 01:58:14 PM

Title: Rotation Values
Post by: rugaroo on July 15, 2017, 01:58:14 PM
Ok, I don't think I am going crazy but maybe I am, or past due. Who know's... But... I am updating an older .Net routine for use in 2016, and found a command that no longer works like it did in 2012.

The command prompts the user for a double, then prompts for the user to select either a text, mtext or dimension entity. After that I set either the TxtEnt.Rotation, MTxtEnt.Rotation or DimensionEnt.TextRotation to the double that was obtained from the user. The issue is that the value that is getting passed to any of the entities is not what the user enters, unless it is 0, then it works fabulously!

Do I need to pass the double through as a vector or something???
Title: Re: Rotation Values
Post by: gile on July 15, 2017, 05:33:03 PM
Hi,

Keep in mind that, internally, the Rotation (as any other angular values) is always expressed in radians.
Title: Re: Rotation Values
Post by: rugaroo on July 15, 2017, 05:57:53 PM
 :uglystupid2:
Title: Re: Rotation Values
Post by: Atook on July 15, 2017, 07:06:54 PM
Also, you can prompt for a rotation instead of a double, which should make the deg/rad conversion for you if needed.