home *** CD-ROM | disk | FTP | other *** search
- ;****** TY\PLAY.LSP ****** 03-17-90 BJ
- (defun C:PLAY ( )
- (setq wcy 1)
- (while wcy
- (setq mode (getint
- "\n 1.!-lay/2.cha-lay/3.f-/4.t- <or RETRUN for none>:"))
- (if (null mode) (setq wcy nil))
- (if (= mode 1) (command "layer" "?" "" ""))
- (if (= mode 2) (clay))
- (if (= mode 3) (progn (s-s02) (command "layer" "f" ss02 "")))
- (if (= mode 4) (progn (s-s02) (command "layer" "t" ss02 "")))
- )
- )
- ;-----------
- (defun s-s02 ( )
- (setq s02 (substr (getstring "enter layer name --? <1>:") 1 1))
- (if (= s02 "") (setq s02 "1"))
- (setq ss02 (strcat "zx" s02 ",qc" s02 ",cc" s02 ",mc" s02))
- (setq ss02 (strcat ss02 ",pm" s02 ",hz" s02 ",sj" s02))
- )
- ;------------
- (defun clay ( )
- (setq ppp (ssget))
- (setq s02 (substr (getstring "enter layer name --? <1>:") 1 1))
- (if (= s02 "") (setq s02 "1"))
- (setq wxr 0 n (sslength ppp))
- (while (< wxr n)
- (setq ss (entget (ssname ppp wxr)))
- (setq s01 (substr (cdr (assoc 8 ss)) 1 2))
- (setq s12 (strcat s01 s02))
- (setq ss (subst (cons 8 s12) (assoc 8 ss) ss))
- (entmod ss)
- (setq wxr (1+ wxr))
- )
- )
- ;------------