About Displaying Drawing Limits and Extents (ActiveX)

You can display a view based on the drawing boundaries or the extents of the objects in the drawing.

ZoomAll displays the entire drawing. If the objects extend beyond the limits, ZoomAll displays the extents of the objects. If the objects are drawn within the limits, ZoomAll displays the limits.

ZoomExtents calculates zooms based on the extents of the active viewport, not the current view. Usually the active viewport is entirely visible, so the results are obvious and intuitive. However, when using the Zoom methods in model space while working in a paper space viewport, if you are zoomed in beyond the paper space viewport's borders, some of the area zoomed may not be visible.

ZoomExtents changes the view to encompass the entity extents for the current drawing. In some cases (for both ZoomAll and ZoomExtents), this may cause a regeneration. Regeneration will not occur on layers that are frozen or turned off. If your drawing has no objects, ZoomExtents displays the drawing limits.

For 3D views, ZoomAll and ZoomExtents have the same effect. Infinite construction lines (xlines) and rays do not affect either option.

ZoomPrevious zooms the current viewport to its previous extents.

Zoom in on the active drawing to all contents and to the drawing extents

AutoLISP
(vl-load-com)
(defun c:Ch3_ZoomAll()
    (setq acadObj (vlax-get-acad-object))  
    ;; ZoomAll
    (alert "Perform a ZoomAll")
    (vla-ZoomAll acadObj)

    ;; ZoomExtents
    (alert "Perform a ZoomExtents")
    (vla-ZoomExtents acadObj)
)
VBA (AutoCAD Only)
Sub Ch3_ZoomAll()
  ' ZoomAll
  MsgBox "Perform a ZoomAll", , "ZoomAll"
  ThisDrawing.Application.ZoomAll

  ' ZoomExtents
  MsgBox "Perform a ZoomExtents", , "ZoomExtents"
  ThisDrawing.Application.ZoomExtents
End Sub