 - ;图元归层 明经 ZZXXQQ 2013.5.20 改
- (defun c:ly ()
- (setvar "CMDECHO" 0)
- (if (and (princ "\n选择图元: ")
- (setq ss (ssget '((0 . "CIRCLE,LINE,*POLYLINE,DIMENDION,*TEXT,INSERT"))))
- (setq wei (getstring "\n层名尾号: "))) (progn
- (if (setq ss1 (ssget "P" '((0 . "CIRCLE"))))
- (command "_.CHPROP" ss1 "" "LA" (strcat "立管层" wei) "")
- )
- (command "_.SELECT" ss "R" ss1 "")
- (if (setq ss1 (ssget "P" '((0 . "LINE"))))
- (command "_.CHPROP" ss1 "" "LA" (strcat "管道层" wei) "")
- )
- (command "_.SELECT" ss "R" ss1 "")
- (if (setq ss1 (ssget "P" '((0 . "*POLYLINE,DIMENSION,*TEXT"))))
- (command "_.CHPROP" ss1 "" "LA" (strcat "标注层" wei) "")
- )
- (command "_.SELECT" ss "R" ss1 "")
- (if (setq ss1 (ssget "P" '((0 . "INSERT"))))
- (command "_.CHPROP" ss1 "" "LA" (strcat "图块层" wei) "")
- )
- ))
- (setvar "CMDECHO" 1)
- (princ)
- )
|