AddArc method example

Sub AddArcExample()
'This example adds an arc to the drawing.
     Dim myArc As AcadArc
     Dim ctrPt(0 To 2) As Double
     ctrPt(0) = 5: ctrPt(1) = 3
     'Add the arc to the .dwg
     Set myArc = ThisDrawing.ModelSpace.AddArc(ctrPt, 2.5, toRadians(15), toRadians(105))
     ' Display the entity
     myArc.Update
     ThisDrawing.Application.ZoomExtents
     MsgBox "Arc created w/ center point at 5,3.", vbInformation, "AddArc Example"
End Sub
Function toRadians(ByVal inDegrees As Double) As Double
  toRadians = inDegrees * 3.141592 / 180
End Function

© Bricsys NV. All rights reserved.