中心と半径を指定して円を作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.AddCircle(Center, Radius)
タイプ: Block、ModelSpace、PaperSpace
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
球の中心を示す 3D WCS 座標
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
円の半径。正の数値でなければなりません。
円は、WCS の XY 平面に作成されます。
VBA:
Sub Example_AddCircle()
' This example creates a circle in model space.
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
' Define the circle
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
' Create the Circle object in model space
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
ZoomAll
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AddCircle()
;; This example creates a circle in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the circle
(setq centerPoint (vlax-3d-point 0 0 0)
radius 5)
;; Create the Circle object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq circleObj (vla-AddCircle modelSpace centerPoint radius))
(vla-ZoomAll acadObj)
)