Here'e an example for creating a Donut using the default values for a donut:
Sub DonutTest()
Dim dID As Double
Dim dOD As Double
Dim vPt As Variant
Dim dRadius As Double
Dim dWidth As Double
vPt = ThisDrawing.Utility.GetPoint(, vbCr & "Select point for donut: ")
dID = ThisDrawing.GetVariable("donutid") / 2
dOD = ThisDrawing.GetVariable("donutod") / 2
dRadius = (dID + dOD) / 2#
dWidth = dOD - dID
Dim vPt1 As Variant
Dim vPt2 As Variant
Dim vPts(3) As Double
Dim opoly As AcadLWPolyline
vPt1 = ThisDrawing.Utility.PolarPoint(vPt, 0#, dRadius)
vPt2 = ThisDrawing.Utility.PolarPoint(vPt, 0#, -dRadius)
vPts(0) = vPt1(0)
vPts(1) = vPt1(1)
vPts(2) = vPt2(0)
vPts(3) = vPt2(1)
Set opoly = ThisDrawing.ModelSpace.AddLightWeightPolyline(vPts)
opoly.ConstantWidth = dWidth
opoly.SetBulge 0, 1#
opoly.SetBulge 1, 1#
opoly.Closed = True
End Sub
"dbp428" wrote in message news:6003834@discussion.autodesk.com...
Set Donut = ThisDrawing.ModelSpace.AddLightWeightPolyline(returnPntDonut)
Error:
Too few elements in SafeArray ot total number of elements is not a multiple
of three.