 ; Drawdash - draws a dashed line on a specific (MISC) layer
 ; Copyright 1995 by Rocket Software
 ; It's a good thing that English isn't entirely phonetic.
 (DEFUN LEER (shk)
  (setq *error* prev)
  (setvar "clayer" clay)
  (setvar "celtype" clint)
  (setvar "cecolor" cell)
  (write-line (strcat "\n" shk))
 (princ))

 (DEFUN C:DRAWDASH (/ pa clay clint cell)
  (setvar "cmdecho" 0)
  (if (null (tblsearch "ltype" "dashed"))
  (command "linetype" "load" "dashed" "acad.lin" ""))
  (setq prev *error*)
  (setq *error* leer)
  (setq clay (getvar "clayer"))
  (if (null (tblsearch "layer" "misc"))
      (command "layer" "new" "misc" ""))
  (setvar "clayer" "misc")
  (setq clint (getvar "celtype"))
  (setvar "celtype" "dashed")
  (setq cell (getvar "cecolor"))
  (setvar "cecolor" "red")
  (setq pa "Select points: ")
  (command "LINE")
  (while (setq pa (getpoint pa))
         (command pa))
  (command "")
  (leer "")
 (PRINC))