I was hoping I could get some help with modifying an existing LISP routine or at least use the same concept. I just started a new job so I don't have all my reference materials and old lisps to refer to here yet. We have a routine that will place sequential text numbering to label lots in a subdivision. What we would prefer to do is use a block with an attribute in place of just text. The block name is "lotnumber", scale based on the drawing, and the rotation will probably be a constant (zero, 90). As always, thanks for any advise or guidance with this. It's been awhile since I've been able to browse here again and with the new job keeping me busy not sure how much I'll get to stop in.
Thanks Again,
Dan
Code:
(defun lotn ( / p p1 p2 n1 scmde)
(setq n1 (getint "Enter starting lot number: "))
(setq p1 (getpoint "\nText location: "))
(setq scmde (getvar "cmdecho"))
(while p1
(setvar "cmdecho" 0)
(setq p2 p1)
(if (= 0.0 (cdr (assoc 40 (tblsearch "style" (getvar "textstyle")))))
(command "text"
"J"
"MC"
(setq p p1)
(setq p "")
(setq p "")
(setq p n1)
)
(command "text"
"J"
"MC"
(setq p p1)
(setq p "")
(setq p n1)
)
);if
(setq n1 (+ n1 1))
(setq p1 (getpoint "\nText location: "))
(if (= p1 p2) (setq p1 nil))
)
(setvar "cmdecho" scmde)
(princ)
)
(defun C:LOTNO ()
(lotn)
)
(princ "Type LOTNO to begin.")
(princ)