Mirror Method

Back to Methods Reference

Creates a mirror image copy of a planar object around an axis.

Signature

VBA : RetVal = object.Mirror(Point1, Point2)

VL : RetVal = (vla-Mirror object Point1 Point2)

(vla-Mirror obj fpoint spoint)

  • Object : All Drawing Objects
    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 mirror axis.

  • Point2 : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying the second point of the mirror axis.

  • RetVal : Mirrored object
    This object can be one of any Drawing Objects.

System Variables

To manage the reflection properties of text objects, use the MIRRTEXT system variable. The default setting of MIRRTEXT is on (1), which causes text objects to be mirrored just as any other object. When MIRRTEXT is off (0), text is not mirrored.

This method places the reflected image into the drawing and retains the original object. To remove the original object, use the Delete method.

You can mirror a Viewport object in paper space, although doing so has no affect on its model space view or on model space objects.

AutoCAD checks to see if the object to be copied owns any other object. If it does, it performs a copy on those objects as well. The process continues until all owned objects have been copied.

NOTE!
You cannot execute this method while simultaneously iterating through a collection. An iteration will open the work space for a read-only operation, while this method attempts to perform a read-write operation. Complete any iteration before you call this method.

AttributeReference: You should not attempt to use this method on AttributeReference objects. AttributeReference objects inherit this method because they are one of the drawing objects, however, it is not feasible to perform this operation on an attribute reference.Example :


(defun c:al-mirror ()

(vl-load-com)

(setq util (vla-get-utility 
                   (vla-get-activedocument 
                        (vlax-get-acad-object))))
                        
(vla-getentity util 'obj 'ip "\nSelect Object: ")

(setq fpoint (vla-getpoint util nil 
                 "\nSpecify first point of mirror line: "))

(setq spoint (vla-getpoint util fpoint 
                 "\nSpecify second point of mirror line: "))

(setq newobj (vla-Mirror obj fpoint spoint))

(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