Examples:
The following VBA example creates a new document and saves the current view as Saved View. It then creates a rectangle, zooms in on it, saves the resulting view as Full Rectangle, shows a message box, and restores the original view.
Sub Test()
Dim d As Document
Dim v As View
Dim s As Shape
Set d = CreateDocument
Set v = d.Views.AddActiveView("Saved View")
Set s = d.ActiveLayer.CreateRectangle(0, 0, 2, 2)
d.ActiveWindow.ActiveView.ToFitShape s
d.Views.AddActiveView "Full Rectangle"
MsgBox "Zoomed in at the rectangle. Press OK to restore view."
v.Activate
End Sub