NumberOfObjects、AngleToFill、CenterPoint を指定して、オブジェクトの円形状配列複写を作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.ArrayPolar(NumberOfObjects, AngleToFill, CenterPoint)
タイプ: すべての図形オブジェクト
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: 長整数型
円形状配列複写で作成されるオブジェクトの数。これは、2 以上の正数でなければなりません。
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
複写角度(ラジアン)。正の値を入力すると、反時計回りに回転します。負の値を入力すると、時計回りに回転します。角度を 0 にするとエラーが返されます。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
円形状配列複写の中心点を指定する 3D WCS 座標。
タイプ: バリアント型(オブジェクトの配列)
新しいオブジェクトの配列。
AutoCAD によって、配列の中心点から最後に選択されたオブジェクトの参照点までの距離が決定されます。使用される参照点は、最後に選択されたオブジェクトの種類によって異なります。円または円弧の場合は中心点、ブロックまたはシェイプの場合は挿入点、文字の場合は開始位置、線分または太線の場合は端点の 1 つが使用されます。
このメソッドは、AutoCAD ARRAY[配列複写]コマンド/[円形状(P)]の[複写するオブジェクトを回転させますか?]オプションはサポートしませんので注意してください。

NumberOfObjects = 5、AngleToFill = 180、CenterPoint = 0,0,0 の円形状配列複写
AttributeReference:AttributeReference オブジェクトにこのメソッドを使用するべきではありません。AttributeReference オブジェクトがこのメソッドを継承しているのは、図面オブジェクトの 1 つだからですが、属性参照でこの処理を実行することはできません。
VBA:
Sub Example_ArrayPolar()
' This example creates a circle and then performs a polar array
' on that circle.
' Create the circle
Dim circleObj As AcadCircle
Dim center(0 To 2) As Double
Dim radius As Double
center(0) = 2#: center(1) = 2#: center(2) = 0#
radius = 1
Set circleObj = ThisDrawing.ModelSpace.AddCircle(center, radius)
ZoomAll
MsgBox "Perform the polar array on the circle.", , "ArrayPolar Example"
' Define the polar array
Dim noOfObjects As Integer
Dim angleToFill As Double
Dim basePnt(0 To 2) As Double
noOfObjects = 4
angleToFill = 3.14 ' 180 degrees
basePnt(0) = 4#: basePnt(1) = 4#: basePnt(2) = 0#
' The following example will create 4 copies of an object
' by rotating and copying it about the point (3,3,0).
Dim retObj As Variant
retObj = circleObj.ArrayPolar(noOfObjects, angleToFill, basePnt)
ZoomAll
MsgBox "Polar array completed.", , "ArrayPolar Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_ArrayPolar()
;; This example creates a circle and then performs a polar array
;; on that circle.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Create the circle
(setq center (vlax-3d-point 2 2 0)
radius 1)
(setq modelSpace (vla-get-ModelSpace doc))
(setq circleObj (vla-AddCircle modelSpace center radius))
(vla-ZoomAll acadObj)
(alert "Perform the polar array on the circle.")
;; Define the polar array
(setq basePnt (vlax-3d-point 3 3 0)
noOfObjects 4
angleToFill 3.14) ;; 180 degrees
;; The following example will create 4 copies of an object
;; by rotating and copying it about the point (3,3,0).
(setq retObj (vla-ArrayPolar circleObj noOfObjects angleToFill basePnt))
(vla-ZoomAll acadObj)
(alert "Polar array completed.")
)