ZoomAll method example

Private Sub ZoomAll_Example()

' This example creates text and adds it to the drawing using the

' AddText method. It then zooms out using the ZoomAll method.

     

     Dim icadDoc As IntelliCAD.Document

     Dim myText As String

     Dim mtextObj As IntelliCAD.Text

     Dim insPt As IntelliCAD.Point

     Dim height As Double

     Set icadDoc = ActiveDocument

     Set insPt = Library.CreatePoint(0, 9)

     height = 5

     myText = "Test string for the AddText method"

     ' Add the Text object

     Set mtextObj = icadDoc.ModelSpace.AddText(myText, insPt, height)

     mtextObj.Update

     ThisDocument.ActiveViewport.ZoomAll

End Sub