Hello all,
Just wanted to share a program I wrote many years ago but I think I just haven't posted it yet.
It grabs the layer you pick your start point from. I added a few overrides.
Code:
;Draw Polyline Layer Grab.lsp written by Andre Corriveau , Tampa Fl
;2007-07-01 (approximately)
;2008-01-15 Revised to allow for overrides
(defun c:dr (/ sp1 cclayer rl)
(setq cclayer (getvar "clayer"));obtains current layer
(setq sp1 (getpoint "\nspecify start point: "));asks user to specify start point
(if (/= sp1 nil)
(progn
(command "laymcur" sp1);sets selected point as current layer
(setq rl (strcase (getvar "clayer"))) ;gets name of selected layer
(cond
((= rl "0");selected layer is "0" return to previous layer
(setq rl cclayer))
((= rl "DEFPOINTS");selected layer is "DEFPOINTS" return to previous layer
(setq rl cclayer))
)
(command "pline" "non" sp1)
))
(princ))