AddSphere method example

Private Sub AddSphereExample()

'This example adds a sphere to the drawing.

' It then zooms to the extents of the drawing.

     Dim myDoc As IntelliCAD.Document

     Dim sphereObj As IntelliCAD.PolygonMesh

     Dim pt As Point

     Set myDoc = ActiveDocument

     Set pt = Library.CreatePoint(4, 4, 0)

     Set sphereObj = ThisDocument.ModelSpace.AddSphere(pt, 5)

     sphereObj.Update

ThisDocument.ActiveViewport.ZoomExtents

End Sub