Hi,
Found this little lisp routine at http://www.autocadproblems.com/2014/09/marking-level-on-plan-autocad.html
However, when tried it doesn't seem to work. Here's the coding,
;Marking Levels in a Horizontal plan
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:lm()
(while (not
(setq GL1 (entsel "\nFirst Value :"))
))
(setq Lvl1 (entget (car GL1)))
(if (> (length Lvl1) 22)
(setq G_val1 (nth 13 Lvl1))
(setq G_Val1 (nth 11 Lvl1))
)
(while (not
(setq GL2 (entsel "\nSecond Level :"))
))
(setq Lvl2 (entget (car GL2)))
(if (> (length Lvl2) 22)
(setq G_val2 (nth 13 Lvl2))
(setq G_Val2 (nth 11 Lvl2))
)
(setq p1 (getpoint "Pick Range from :"))
(setq d (getdist p1 "Pick Range to :"))
(setq d (float d))
(setq slp1 (- (atof(cdr G_val2)) (atof(cdr G_val1))))
(setq slp (/ slp1 d))
(while
(setq Txt_Pnt (getpoint "\nPick Text Point:"))
(setq d1 (distance p1 Txt_pnt))
(setq new_lvl (+ (atof(cdr G_val1)) (* d1 slp)))
(setq val1 (rtos new_lvl 2 3))
(command "text" Txt_pnt "" "" val1)
)
)
It gives following error "; error: bad argument type: stringp 1"
Any help appreciated.