VL-function for ZOOM extents

Discussion in 'AutoCAD' started by Gustavo Guidi, Dec 28, 2004.

  1. I need to know which function to use to do a zoom extents when I create a
    VPORT in a LAYOUT
    (I can't use (COMMAND "_ZOOM" ..)

    Thanks
     
    Gustavo Guidi, Dec 28, 2004
    #1
  2. (vla-zoomextents (vlax-get-acad-object))

    This changes the current viewport only
     
    Jason Piercey, Dec 28, 2004
    #2
  3. Gustavo Guidi

    Fatty Guest

    (vla-zoomextents (vla-get-application
    (vla-get-activedocument
    (vlax-get-acad-object))))
     
    Fatty, Dec 28, 2004
    #3
  4. Just to expand a bit (run from a layout, obviously):

    (defun C:Test (/ app doc vport)
    (vl-load-com)
    (setq app (vlax-Get-Acad-Object)
    doc (vla-Get-ActiveDocument app))
    (vla-ZoomAll app)
    (setq vport (vla-AddPViewport
    (vla-Get-PaperSpace doc)
    (vlax-3D-Point (getvar "ViewCtr"))
    10.0
    7.5))
    (vla-Display vport :vlax-True)
    (vla-Put-MSPace doc :vlax-True)
    (vla-ZoomExtents app)
    (vla-Put-MSPace doc :vlax-False))

    --
    R. Robert Bell


    "Jason Piercey" <nomail> wrote in message (vla-zoomextents (vlax-get-acad-object))

    This changes the current viewport only
     
    R. Robert Bell, Dec 28, 2004
    #4
  5. Thanks to all for the answear
     
    Gustavo Guidi, Dec 29, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.