Sub AddEllipseExample() ' This example creates an ellipse and adds it to the drawing using the ' AddEllipse method. Dim ctrPt(0 To 2) As Double: ctrPt(0) = 3: ctrPt(1) = 4: ctrPt(2) = 0 Dim majAxis(0 To 2) As Double: majAxis(0) = 10: majAxis(1) = 20: majAxis(2) = 0 Dim dRatio As Double: dRatio = 0.3 'Add the ellipse to the .dwg Dim myEllipse As AcadEllipse Set myEllipse = ThisDrawing.ModelSpace.AddEllipse(ctrPt, majAxis, dRatio) ' Display the entity myEllipse.Update ThisDrawing.Application.ZoomExtents MsgBox "Ellipse created w/ major/minor axis ratio of " & dRatio End Sub
© Bricsys NV. All rights reserved. |