Creates a circle given a center point and radius.
Supported platforms: Windows only
VBA:
RetVal = object.AddCircle(Center, Radius)
Type: Block, ModelSpace, PaperSpace
The objects this method applies to.
Access: Input-only
Type: Variant (three-element array of doubles)
The 3D WCS coordinates specifying the circle's center.
Access: Input-only
Type: Double
The radius of the circle. Must be a positive number.
This circle is created on the XY plane of the WCS.
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)
)