Support

As evidenced by over 30 years of development history, trust-worthy Korean CAD, CADian!

FAQ · 2013.12.11
CADian VBA Sample Code - 3 [ ARC ]
Private Sub CommandButton1_Click()
- Draw an ARC using given centerpoint, Radius, Start angle, and End angle for ARC..
- objectVariable = object.AddArc(Center, Radius, StartAngle, EndAngle)
- * Center
- Variant(Double 3 element Array ); Input only
- 3D WCS coordinate for pointing the centerpoint of ARC.
- Radius
- Double ; Input only
- Radius of ARC.
- StartAngle , EndAngle
- Double ; Input only

The start and end angles, in radians, defining the arc. A start angle greater than an end angle defines a counterclockwise arc.


Dim icadDoc As Document

Dim myArc As Arc


Dim cenPt As Point

Set icadDoc = ActiveDocument

Set cenPt = Library.CreatePoint(4, 2)

""Add the arc to the .dwg

Set myArc = icadDoc.ModelSpace.AddArc(cenPt, 3, 1, 3)

"" Display the entity

myArc.Update

ThisDocument.ActiveViewport.ZoomExtents

MsgBox "Arc created w/ center point at 4,2."
End Sub

Added to cart.

VIEW CART

Please sign in first.

JOIN