- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Trying to create a few lisps so users can dimension, mtext, and mleader without changing UCS along with a few other options I am building in. This lisp below the UCS is on view for the initial leader selection point, but it will immediately change back to UCS previous after that first selection and most importantly before you get to place the text. The text is all that matters for the UCS change.
This is the LISP that works fine except the UCS:
(defun c:ALeader ( / *error* mldr)
(command "-layer" "t" "E-S-T-DIM"
"on" "E-S-T-DIM" "")
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
(princ (strcat "\nError: " errmsg)))
(if cec (setvar 'cecolor cec))
(if cel (setvar 'celtype cel))
(if cly (setvar 'clayer cly))
(if osm (setvar 'osmode osm))
(command-s "_.ucs" "p")
(princ))
(setq cec (getvar 'cecolor)
cel (getvar 'celtype)
cly (getvar 'clayer)
osm (getvar 'osmode))
(if (tblsearch "layer" "E-S-T-DIM")
(setvar "clayer" "E-S-T-DIM")
(command "-layer" "M" "E-S-T-DIM" "C" "white" "" "L" "Continuous" "" ""))
(setvar "cecolor" "bylayer")
(setvar "celtype" "bylayer")
(setvar "osmode" 1)
(command "ucs" "v")
(command "mleader" "o" "m" "0" "x")
(command pause)
(*error* "end")
)
Solved! Go to Solution.