
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been using a very helpful viewport scaling AutoLisp routine for years. I like it better than any that AutoCAD has built into the software. It was written by Ed Jobe. It worked for version 2014, but no longer works in 2016. I'm guessing there may be a conflict with new keyboard shortcuts or command names. If anyone can get this working for 2016, I'd sincerely appreciate it. The original file is attached, but I've copied the code below as well. Thanks in advance.
;Tip1603: VS.LSP Viewport Scale (c)2000, Ed Jobe
;"viewport scale"
;Returns paperspace scale of current viewport for
;transparent use at prompt for scale in INSERT.
;Works similar to dim style option.
;To use with scale command, run VS first.
;
;Changed command name to avoid conflict with XPlode, Ed Jobe 11/6/97
;
(defun get_scale ()
(setq cv (getvar "cvport"));get viewport number
(setq cvh (getvar "viewsize")); get viewport height in ms units
(setq ss (ssget "X" (list '(0 . "viewport") (cons 69 cv))))
(setq enlist (entget (ssname SS 0)))
(setq vsize (assoc 41 enlist));get viewport height in ps units
(setq vsize (cdr vsize));get units
(setq ps (/ vsize cvh));get paperspace scale
(setq ps (/ 1 ps))
);end defun
(defun c:vs ()
(cond
;then allow xp to run transparently
;if insert is running
((= (getvar "cmdnames") "INSERT")
(get_scale))
((= (getvar "cmdnames") "DDINSERT")
(get_scale))
;or if no command is running
((= (getvar "cmdnames") "")
(get_scale))
;all others get cancelled
(t (progn
(princ "\nRun VS.LSP by itself.")
(princ "\nCan only run transparently with INSERT or DDINSERT command.")
);end progn
); end t
);end cond
);end defun
Solved! Go to Solution.