To whomever can help me out,
Is there a way to make attached lisp to be able to use scale of current drawing and attached dwg to be the current scale of drawing? It works perfect on 1:1 drawings but when I use it on enlarged plans at different scales, it comes in at 1:1. I apologize for any inconvenience this might cause but would love to have this lisp work with scaled drawings.
Thanks in advance,
David
(defun c:rv ( / *error* ar bn cm el fn rv )
(setq bn "REVTAG") ;; Rev Cloud Attributed Block
(defun *error* ( msg )
(if cm (setvar 'cmdecho cm))
(if ar (setvar 'attreq ar))
(if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
(princ (strcat "\nError: " msg))
)
(princ)
)
(setq cm (getvar 'cmdecho)
ar (getvar 'attreq)
)
(cond
( (not
(or (tblsearch "BLOCK" bn)
(and
(setq fn (findfile (strcat bn ".dwg")))
(progn
(setvar 'cmdecho 0)
(command "_.-insert" fn nil)
(setvar 'cmdecho cm)
(tblsearch "BLOCK" bn)
)
)
)
)
(princ (strcat "\n" bn ".dwg not found."))
)
( (zerop (logand 2 (cdr (assoc 70 (tblsearch "BLOCK" bn)))))
(princ (strcat "\n" bn " not attributed."))
)
( (setq *rev*
(cond
( (= "" (setq rv (getstring t (strcat "\nSpecify Revision" (if *rev* (strcat " <" *rev* ">: ") ": ")))))
*rev*
)
( rv )
)
)
(command "_.revcloud")
(while (= 1 (logand 1 (getvar 'cmdactive))) (command "\\"))
(setvar 'cmdecho 0)
(setvar 'attreq 0)
(setq el (entlast))
(princ "\nSpecify Point for Revision Block: ")
(command "_.-insert" bn "_S" 1.0 "_R" 0.0 "\\")
(if (not (eq el (setq el (entlast))))
(progn
(setq el (entget (entnext el)))
(if (entmod (subst (cons 1 *rev*) (assoc 1 el) el))
(entupd (cdr (assoc -1 el)))
)
)
)
(setvar 'attreq ar)
(setvar 'cmdecho cm)
)
)
(princ)
)
(princ)