home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / misc_lsp.zip / CONVERT.LSP < prev    next >
Text File  |  1987-06-11  |  935b  |  32 lines

  1. ; Converts 2Dlines to 3Dlines with Z coord. set to current elevation
  2. ; Ian Kitching June 8, 1987
  3.  
  4. (DEFUN DRAW ()
  5. (setq a (cdr (assoc 10 get)))
  6. (setq b (cdr (assoc 11 get)))
  7. (setq a (append a ele))
  8. (setq b (append b ele))
  9. (COMMAND "3DLINE" A B)
  10. (COMMAND "")
  11. )
  12. (defun C:CONVERT ()
  13. (setvar "cmdecho" 0)
  14. (prompt "\nCopies line entities from one layer to 3Dlines on another")
  15.         (setq l (strcase (getstring "\nEnter layer name: ")))
  16.         (setq new (strcase (getstring "\nEnter new layer name: ")))
  17.         (setq ele (getvar "elevation")) (setq ele (list ele))
  18.         (command "layer" "m" new)
  19.         (command "")
  20. (setq e (entnext))
  21.         (while e
  22.            (setq get (entget e))
  23.            (if (= l (cdr (assoc 8 get))) (progn
  24.              (setq line (cdr (assoc 0 get)))
  25.            (if (equal line "LINE") (DRAW))
  26.            )
  27.            )
  28. (setq e (entnext e))
  29.         )
  30. (setvar "cmdecho" 1)
  31. )
  32.