ZoomExtents method example

Sub ZoomExtents_Example()

'This example adds a sphere to the drawing using the AddSphere method.

' 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