;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 2-5-96 ;;;> EDITED: 07-11-2005 ;;; (defun c:vstat () (setq curvno (getvar"cvport")) (setq vtwang (getvar"viewtwist")) ;;; (regapp "ACAD") (setq cvpss (ssget "X" (list(cons 69 curvno)))) (setq cvpent (entget (ssname cvpss 0)(list "ACAD"))) (setq vpscl (/(getvar"viewsize")(cdr(assoc 41 cvpent)))) (setq xvdata (cadr(assoc -3 cvpent))) (setq hvplot (cdr(nth 28 xvdata))) (if (= hvplot 0) (princ "\nHideplot is OFF in Current Viewport. ") (princ "\nHideplot is ON in Current Viewport. ") ) (cond ((or(eq(getvar"lunits")1)(eq(getvar"lunits")5)) (princ (strcat "Viewport scale is: 1:" (rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8)) " (1:"(rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8))")")) ) ((eq(getvar"lunits")2) (princ (strcat "Viewport scale is: 1\"=" (rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8))"' (1:"(rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8))")")) ) ((eq(getvar"lunits")3) (princ (strcat "Viewport scale is: 1\"=" (rtos (/ vpscl 12) 2 (if (eq (rem vpscl 1) 0)0 8))"' (1:"(rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8))")")) ) ((eq(getvar"lunits")4) (princ (strcat "Viewport scale is: " (rtos (/ 12.0000 vpscl)4 6)"=1'-0\" (1:"(rtos vpscl 2 (if (eq (rem vpscl 1) 0)0 8))")")) ) ) (princ (strcat "\nViewtwist = "(angtos(getvar"viewtwist")0 4)"; Viewport Layer Name is: "(cdr(assoc 8 cvpent)))) ;;; (setq chgvph (ukword 1 "Yes No" ;;; (if (= hvplot 0) ;;; "Turn Hideplot ON in current viewport?" ;;; "Turn Hideplot OFF in current viewport?" ;;; ) ;;; (if (= hvplot 0) ;;; "Yes" ;;; "No" ;;; ) ;;; ) ;;; ) ;;; (if (= chgvph "Yes") ;;; (if (= hvplot 0) ;;; (command "mview" "h" "ON" (ssname cvpss 0) "") ;;; (command "mview" "h" "OFF" (ssname cvpss 0) "") ;;; ) ;;; ) (princ) )