Sub Example_ArrayPolar()
' This example creates a line and a polar array based on that line.
Dim myLine As IntelliCAD.Line
Set myDoc = Application.ActiveDocument
Set myLine = myDoc.ModelSpace.AddLine(Library.CreatePoint(4, 4), Library.CreatePoint(7, 1))
myLine.Update
ThisDocument.ActiveViewport.ZoomExtents
Dim noOfObjects As Integer
Dim angleToFill As Double
Dim basePt As IntelliCAD.Point
noOfObjects = 6
angleToFill = 4.72 ' 270 degrees
Set basePt = Library.CreatePoint(4, 2, 0)
' Create 6 copies of an object by rotating and copying it about the point (4,2,0).
Dim retObj As Variant
Set retObj = myLine.ArrayPolar(noOfObjects, angleToFill, basePt)
retObj.Update
ThisDocument.ActiveViewport.ZoomExtents
MsgBox "Polar array constructed."
End Sub