Rotate Method

Back to Methods Reference

Rotates an object around a base point.

Signature

VBA : object.Rotate BasePoint, RotationAngle

VL : (vla-Rotate object BasePoint RotationAngle

(vla-Rotate obj bpoint rangle)

  • Object : All Drawing Objects, AttributeReference
    The object or objects this method applies to.

  • BasePoint : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying the point through which the axis of rotation is defined as parallel to the Z axis of the UCS.

  • RotationAngle : Double; input-only
    The angle in radians to rotate the object. This angle determines how far an object rotates around the base point relative to its current location.

Example :


(defun c:al-rotate ()

(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 rangle (vla-getangle util bpoint "\nRotation Angle: "))

(vla-Rotate obj bpoint rangle)

(princ)

);defun

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website