Saturday 30 September 2017

Autocad custom apps : DBtext rotation angle

Well, always the same problem when it is time to code for angles.
Where is the zero, what direction, what units...

This is for the Autodesk.Autocad.Database.DBtext (single line text)
Here is the code for this case

        Dim AngleIs As Double
        AngleIs = CDbl(Me.tbAngle.Text) 'angle got in Gradians from a text box
        AngleIs -= 100 'Gradians i said
        AngleIs = -AngleIs
        AngleIs = AngleIs * math.PI/200 'Gradians i said

Units : radians
Direction : CounterClockWise
Zero : Positive X axis

No comments:

Post a Comment