0% found this document useful (0 votes)
111 views

Lisp

The document discusses a LISP function called DIMSCL that sets the dimension scale variable. It contains logic to determine the correct dimension scale based on factors like the current space (model or paper), number of viewports, and previous user input.

Uploaded by

Dann Tudor
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views

Lisp

The document discusses a LISP function called DIMSCL that sets the dimension scale variable. It contains logic to determine the correct dimension scale based on factors like the current space (model or paper), number of viewports, and previous user input.

Uploaded by

Dann Tudor
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LISP.txt ;;; ;;; ;;; Author: ;;; Henry C. Francis ;;; 425 N.

Ashe Street ;;; Southern Pines, NC 28387 ;;; ;;; http://www.pinehurst.net/~pfrancis ;;; e-mail [email protected] ;;; ;;; Copyright: 1/26/96 ;;; Edited: 7/21/99 ;;; All rights reserved. ;;; ;;; Fixed prev selection set from getting wiped by viewport selection. ;;; (DEFUN dimscl () (SETVAR "HIGHLIGHT" 1) (IF (EQ (FIX (ATOF (GETVAR "ACADVER"))) 15) NIL (IF (AND C:MYQSAVE (EQ (NTH 2 (NTH 1 C:MYQSAVE)) " QSaved................: ") (NOT (EQ c:qsave c:myqsave)) ) ;_ end of AND (PROGN (COMMAND ".UNDEFINE" "QSAVE") (SETQ C:QSAVE C:MYQSAVE) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of IF ;;; (if (and (eq(getvar"lunits")2)(eq(getvar"dimscale")96)) ;fixes personal ;;; (setvar "dimscale" (ureal 1 "" "ReReSet Dimscale to what YOU want" 40)) ;prob w/ ridgid ;;; ) ;company std (IF asked_already (IF (EQ (CAR asked_already) (STRCAT (GETVAR "dwgprefix") (GETVAR "dwgname")) ) ;_ end of eq (SETQ dimsc (CADR asked_already)) (SETQ asked_already nil) ) ;_ end of if ) ;_ end of if (IF gvpno nil (LOAD "gvpno") ) ;_ end of if (IF (EQ (GETVAR "dimscale") 0) (PROGN (SETQ curvno (GETVAR "cvport")) (COND ((AND (> curvno 1) (EQ (GETVAR "tilemode") 0)) ;floating model space (PROGN (SETQ predimsc_ss (SSGET "P")) (SETQ cvpss (SSGET "X" (LIST (CONS 69 curvno)))) (SETQ cvpent (ENTGET (SSNAME cvpss 0))) (SETQ dimsc (/ (GETVAR "viewsize") (CDR (ASSOC 41 cvpent)))) (SETQ asked_already (LIST (STRCAT (GETVAR "dwgprefix") (GETVAR "dwgname") ) ;_ end of strcat dimsc Page 1

LISP.txt ) ;_ end of list ) ;_ end of setq (COMMAND ".select" predimsc_ss "") (COMMAND) ) ;_ end of progn ) ((AND (EQ (GETVAR "tilemode") 1) (NOT asked_already)) ;model space - scale to use not known (PROGN (IF (EQ mycmdname "C:REATTR") (SETQ dimsc 20) (SETQ dimsc (ureal 1 "" "Dimscale to use when TILEMODE=1" (IF tm1_dimsc tm1_dimsc (GETVAR "Dimscale") ) ;_ end of if ) ;_ end of ureal ) ;_ end of setq ) ;_ end of if (SETQ asked_already (LIST (STRCAT (GETVAR "dwgprefix") (GETVAR "dwgname") ) ;_ end of strcat dimsc ) ;_ end of list ) ;_ end of setq ) ;_ end of progn ) ((AND asked_already (EQ (GETVAR "tilemode") 1)) ;model space - scale to use is known (SETQ dimsc (CADR asked_already)) ) ((AND (EQ curvno 1) (EQ (GETVAR "tilemode") 0)) (SETQ dimsc 1) ) ;paper space ) ;_ end of COND ) ;_ end of progn (SETQ dimsc (GETVAR "dimscale")) ) ;_ end of if (EVAL dimsc) ) ;_ end of defun ;|Visual LISP Format Options (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|;

Page 2

You might also like