Rotates an object
around a 3D axis. Point1 and Point2 define the line that becomes the
axis of rotation.
Signature
VBA : object.Rotate3D
Point1, Point2, RotationAngle
VL : (vla-Rotate3D
object Point1 Point2 RotationAngle)
(vla-Rotate3D obj bpoint spoint
rangle)
-
Object : All
Drawing Objects, AttributeReference
The object or objects this method applies to.
-
Point1 : Variant
(three-element array of doubles); input-only
The 3D WCS coordinates specifying the first point of the axis line.
-
Point2 : Variant
(three-element array of doubles); input-only
The 3D WCS coordinates specifying the second point of the axis line.
-
RotationAngle :
Double; input-only
The angle in radians to rotate the object about the selected axis.
Example :
(defun c:al-rotate3D ()
(vl-load-com)
(setq util (vla-get-utility
(vla-get-activedocument
(vlax-get-acad-object))))
(vla-getentity util 'obj 'ip "\nSelect Object: ")
(setq bpoint (vla-getpoint util nil "\nSpecify base point: "))
(setq spoint (vla-getpoint util bpoint "\nSpecify second point: "))
(setq rangle (vla-getangle util bpoint "\nRotation Angle: "))
(vla-Rotate3D obj bpoint spoint rangle)
(princ)
);defun
|
|