Move Method

Back to Methods Reference

Moves an object along a vector.

Signature

VBA : object.Move Point1, Point2

VL : (vla-move object Point1 Point2)

(vla-move theobj PT1 PT2)

  • Object : All Drawing Objects, AttributeRef
    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 move vector.
  • Point2 Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying the second point of the move vector.

Remarks

The two points you specify define a displacement vector indicating how far the given object is to be moved and in what direction.

Example :


(defun c:al-move ()

(vl-load-com)

;get a reference to the Utilities Object :
(setq util (vla-get-utility 
                   (vla-get-activedocument 
                        (vlax-get-acad-object))))

;select the object                        
(vla-getentity util 'theobj 'ip "\nSelect Object: ")

;get the base point
(setq BP (vla-getpoint util nil
         "\nSpecify base point or displacement: "))

;get the displacement
(setq PT2 (vla-getpoint util BP
          "\nSpecify second point of displacement: "))

;move the object
(vla-move theobj BP PT2)

(princ)

);defun

(princ)
 
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