PSLTSCALE

Discussion in 'AutoCAD' started by mike shick, Aug 18, 2004.

  1. mike shick

    mike shick Guest

    Does anyone know the lisp routine for switching psltscale from 0 to 1 when
    switching from model to paper space?

    Thanks.

    Mike
     
    mike shick, Aug 18, 2004
    #1
  2. mike shick

    Paul Turvill Guest

    This was posted recently. I'm not the author, and I'm sorry to say I didn't
    make a record of who made the original post; but it works as advertised.:

    ;;loading activex functionality
    (vl-load-com)
    (vl-load-reactors)
    ;; Following 2 functions set up different ltscales for paper & model space,
    then automatically
    ;; Switches betw them, according to the reactor's detecting paper or model
    space.
    (defun c:pMS ()
    (setq PSLTS (getreal "\nEnter PaperSpace LTScale:"))
    (setq MSLTS (getreal "\nEnter ModelSpace LTScale:"))
    )
    (defun ChangedLayout (reactor layout / )
    (if (= (nth 0 layout) "Model")
    (progn
    (if MSLTS
    (setvar "ltscale" MSLTS)
    (setvar "ltscale" 1)
    )
    )
    (progn
    (setvar "psltscale" 1)
    (if PSLTS
    (setvar "ltscale" PSLTS)
    (setvar "ltscale" 0.25)
    )
    (vla-Regen (vla-Get-ActiveDocument (vlax-Get-Acad-Object))
    acAllViewports)
    )
    );if
    );
    (if
    (not *LayoutLTS*)
    (setq *LayoutLTS* (vlr-miscellaneous-reactor nil '(:)VLR-layoutSwitched .
    ChangedLayout))))
    )
    ___
     
    Paul Turvill, Aug 18, 2004
    #2
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.