Creates a polar array
of objects given a NumberOfObjects, AngleToFill, and CenterPoint.
Signature
VBA : RetVal =
object.ArrayPolar (NumberOfObjects, AngleToFill, CenterPoint)
VL : RetVal = (vla-ArrayPolar
object NumberOfObjects AngleToFill CenterPoint)
(vla-ArrayPolar obj theinteger (dtr
theangle) thepoint)
-
Object : All
Drawing Objects
The object or objects this method applies to.
-
NumberOfObjects :
Integer; input-only
The number of objects to be created in the polar array. This must be
a positive integer greater than 1.
-
AngleToFill :
Double; input-only
The angle to fill in radians. A positive value specifies
counterclockwise rotation. A negative value specifies clockwise
rotation. An error is returned for an angle that equals 0.
-
CenterPoint :
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the center point for the polar
array.
-
RetVal : Variant
Array (array of objects)
The array of new objects.
Remarks
AutoCAD determines the
distance from the array's center point to a reference point on the last
object selected. The reference point used depends on the type of object
previously selected. AutoCAD uses the center point of a circle or arc,
the insertion point of a block or shape, the start point of text, and
one endpoint of a line or trace.
Note that this method
does not support the Rotate While Copying option of the AutoCAD ARRAY
command.
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-arraypolar ()
(vl-load-com)
(defun dtr (a)
(* pi (/ a 180))
);defun
(setq util (vla-get-utility
(vla-get-activedocument
(vlax-get-acad-object))))
(vla-getentity util 'obj 'ip "\nSelect Object: ")
(setq thepoint (vla-GetPoint util nil
"\nSpecify center point of array or [Base]: "))
(setq theinteger (vla-GetInteger util
"\nEnter the number of items in the array: "))
(setq theangle (vla-GetReal util
"\nSpecify the angle to fill (+=ccw, -=cw): "))
(setq thearray (vla-ArrayPolar obj theinteger
(dtr theangle) thepoint))
(princ)
);defun
|
|