;;;Place property number block (triangle with number as attribute) ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 6/19/2001 ;;;> EDITED: 09-04-2002 ;;; (defun c:propno () (if dimscl nil (load "dimscl" "\nFile DIMSCL.LSP not loaded! ") ) ;_ end of if (dimscl) (if c:mklayr nil (load "mklayr" "\nFile MKLAYR.LSP not loaded! ") ) ;_ end of if (c:svlayr) (if gvpno nil (load "gvpno" "\nFile GVPNO.LSP not loaded! ") ) ;_ end of if (gvpno) (setq mrjg "C" llt "-" colr "9" modf "PROP" ) ;_ end of setq (c:mklayr) (setq seld_text nil) (setq oldreq (getvar "attreq")) (setq olddia (getvar "attdia")) (setq attndx 0) (setq attno (uint 1 "" "Enter first property number to use" (if attno attno 1))) (setq attincr (uint 1 "" "Enter property number increment" (if attincr attincr 1))) (while (not (eq (setq pnoinspt (upoint 1 "Select Quit" "Property number insertion point or elect text for location, or uit." nil nil ) ;_ end of upoint ) ;_ end of setq "Quit" ) ;_ end of eq ) ;_ end of not (if (eq pnoinspt "Select") (progn (setvar "attreq" 0) (setvar "attdia" 0) (while (or (not (setq seld_text (entsel "\nSelect text for location"))) (if seld_text (not (eq (cdr (assoc 0 (entget (car seld_text)))) "TEXT")) ) ;_ end of if ) ;_ end of or (cond ((not seld_text) (princ "\nNo Text was selected!") ) ((not (eq (cdr (assoc 0 (entget (car seld_text)))) "TEXT")) (princ "\nEntity selected is not text!") ) ) ;_ end of cond ) ;_ end of while (setq text_ent (entget (car seld_text))) (setq pnoinspt (polar (cdr (assoc 11 text_ent)) (+ (/ pi 2) (cdr (assoc 50 text_ent))) (* 2.5 (cdr (assoc 40 text_ent))) ) ;_ end of polar ) ;_ end of setq ) ;_ end of progn (progn (setvar "attreq" 1) (setvar "attdia" 1) ) ;_ end of progn ) ;_ end of if (setq pnoinspt (list (car pnoinspt) (cadr pnoinspt) (* 1000 dimsc))) (command ".insert" "propno" pnoinspt dimsc dimsc (* (/ (cdr (assoc 50 text_ent)) pi) 180);(- 0 (* (/ (getvar "viewtwist") pi) 180)) (if (eq pnoinspt "Select") "Select" ) ) ;_ end of command (setq attent (entget (entnext (entlast)))) (setq newatt (subst (cons 1 (itoa (+(* attincr attndx)attno))) (assoc 1 attent) attent)) (entmod newatt) (entupd (cdr(assoc -1 newatt))) (setq attndx (1+ attndx)) ) ;_ end of while (setq attno (+(* attincr attndx)attno)) (c:rslayr) (setvar "attreq" oldreq) (setvar "attdia" olddia) (setq seld_ent nil) (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 0 0 0 T T nil T) ***Don't add text below the comment!***|;