円弧の中心、半径、開始角度、終了角度を指定して円弧を作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.AddArc(Center, Radius, StartAngle, EndAngle)
タイプ: Block、ModelSpace、PaperSpace
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
円弧の中心点を指定する 3D WCS 座標。
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
円弧の半径。
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
ラジアンで表示した、円弧を定義するための開始角度と終点角度。開始角度を終点での角度より大きくすると、反時計回りの円弧が定義されます。
追加の注意はありません。
VBA:
Sub Example_AddArc()
' This example creates an arc in model space.
Dim arcObj As AcadArc
Dim centerPoint(0 To 2) As Double
Dim radius As Double
Dim startAngleInDegree As Double
Dim endAngleInDegree As Double
' Define the circle
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
startAngleInDegree = 10#
endAngleInDegree = 230#
' Convert the angles in degrees to angles in radians
Dim startAngleInRadian As Double
Dim endAngleInRadian As Double
startAngleInRadian = startAngleInDegree * 3.141592 / 180#
endAngleInRadian = endAngleInDegree * 3.141592 / 180#
' Create the arc object in model space
Set arcObj = ThisDrawing.ModelSpace.AddArc(centerPoint, radius, startAngleInRadian, endAngleInRadian)
ZoomAll
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AddArc()
;; This example creates an arc in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the arc
(setq centerPoint (vlax-3d-point 0 0 0)
radius 5
startAngleInDegree 10
endAngleInDegree 230)
;; Convert the angles in degrees to angles in radians
(setq startAngleInRadian (/ (* startAngleInDegree 3.141592) 180))
(setq endAngleInRadian (/ (* endAngleInDegree 3.141592) 180))
;; Create the arc object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq arcObj (vla-AddArc modelSpace centerPoint radius startAngleInRadian endAngleInRadian))
(vla-ZoomAll acadObj)
)