Hi,
I'm trying to insert a block with a given rotation angle, however the angle it rotates is no where near the supplied rotation.
here is the command:
rotAng = 126.65418256
Set blockobj = ThisDrawing.ModelSpace.InsertBlock(inPt, "NorthArrow", 1, 1, 1, rotAng)
The block in placed in the proper inserted position, but the angle is not 126.65418256
Through properties dialog Box-- rotation of place block = 33.24988163
Units are set to:
Decimal Deg
Clockwise
Direction = North
What the ??? is happening?
If I insert the block via the command line and provide this angle at the command line , the block is place at the desired orientation.
If I use the following code:
blockobj.Rotate inPt, ThisDrawing.Utility.GetAngle(inPt, "Select Rotation Angle:") ....getting user supplied angle
the block rotates to the desired orientation.
But, passing the angle to these functions results in undesirable orientation......... consistent but in err
System
ACAD Map 3D 2012 on Win 7 Pro also ACAD Map 3D 2012 on Win XP sp3
Installed VBA Enabler
Any thoughts??
Hi,
the UNITS-setting is not important for development, because if you have something to do with angles, it's always based on radiant.
So you have to recalc your degree-angle to radiant:
126.65418256 / 180.0 * Math.PI
For settings like north-direction and counterclockwise ... you have to prepare your angle 126.65.. before converting to radiant.
AutoCAD always calculates
- alfred -