Gets the angle
specified. Ignores the setting of the ANGBASE system variable.
Signature
VBA : RetVal =
object.GetOrientation([Point][, Prompt])
VL : RetVal = (vla-GetOrientation
object Point Prompt)
(vla-GetOrientation util nil
"\nBase Point:\n")
-
Object : Utility
The object or objects this method applies to.
-
Point : Variant
(three-element array of doubles); input-only; optional
The 3D WCS coordinates specifying the base point.
-
Prompt : Variant
(string); input-only; optional
The text used to prompt the user for input.
-
RetVal : Double
The specified angle.
Remarks
AutoCAD pauses for user
input of an angle, and sets the return value to the value of the
selected angle. The Point parameter specifies an angle base point in the
WCS. The Prompt parameter specifies a string that AutoCAD displays
before it pauses. Both Point and Prompt are optional.
The AutoCAD user can
specify the angle by entering a number in the current angular units
format. The user can specify the angle also by specifying two 2D
locations on the graphics screen. AutoCAD draws a rubber-band line from
the first point to the current crosshair position to help the user
visualize the angle. If the Point parameter is provided, AutoCAD uses
this value as the first of the two points. The angle is measured in the XY
plane of the WCS (this method ignores the Z field of Point). The
direction of angular increase is always counterclockwise.
Regardless of the method
used to specify the angle, GetOrientation always sets the return value
to a value expressed in radians.
This method is similar to
the GetAngle method, but it ignores the current direction of angle 0,
which is stored in the ANGBASE system variable. The 0 angle employed by
GetOrientation is always to the right: "east" or "three
o'clock."
If a keyword is returned
instead of an angle AutoCAD will generate the error message "User
input keyword." Use the GetInput method to obtain the keyword from
the return value.
Example :
(defun c:al-getorientation ()
(vl-load-com)
(setq util (vla-get-utility
(vla-get-activedocument
(vlax-get-acad-object))))
(setq ort (vla-GetOrientation util nil "\nBase Point:\n"))
(princ ort)
(princ)
);defun
|
|