How to Determine when a Viewport is Active

Discussion in 'AutoCAD' started by pashley, Dec 10, 2004.

  1. pashley

    pashley Guest

    Is there a system variable (or some other way) to determine when a paperspace viewport is active when Tilemode is 0?
     
    pashley, Dec 10, 2004
    #1
  2. pashley

    Dann Guest

    if cvport = 2 Then a ModelSpace viewport is active.
     
    Dann, Dec 10, 2004
    #2
  3. pashley

    Dann Guest

    sorry
    if cvport > 1 Then a ModelSpace viewport is active.
     
    Dann, Dec 10, 2004
    #3
  4. pashley

    pashley Guest

    Thanks. Now, is there a way to capture the scale of the active viewport? I know the vpscale command reports it but how would would you get the number into a virable?
     
    pashley, Dec 10, 2004
    #4
  5. pashley

    Jeff Mishler Guest

    (setq *doc* (vla-get-activedocument (vlax-get-acad-object)))
    (if (and (= acPaperSpace (vla-get-activespace *doc*))
    (= :vlax-true (vla-get-mspace *doc*))
    )
    (progn
    (setq actVp (vla-get-activepviewport *doc*))
    (setq scl (/ 1 (vla-get-customscale actVp)))
    )
    )
     
    Jeff Mishler, Dec 10, 2004
    #5
  6. (caddr (trans '(0 0 1) 3 2))

    --
    Autodesk Discussion Group Facilitator



    I know the vpscale command reports it but how would would you get the number
    into a virable?
     
    Jason Piercey, Dec 10, 2004
    #6
  7. pashley

    pashley Guest

    Perfect. Thanks.
     
    pashley, Dec 10, 2004
    #7
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.