(defun MODENT (E EE COL)
(setq E (entget E))
(if (= (assoc EE E) NIL)
(setq E (append E (list (cons EE COL))))
(setq E (subst (cons EE COL) (assoc EE E) E))
)
(entmod E)
)
(defun C:bb (/ SS KEY NUM NUM0 N E LEN)
;(arxload "acetutil.arx" NIL)
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
;(initget "1 2")
(setq KEY "1");(getstring "\\n[1 改顏色/2 改层]<1>: "))
(if (or (= KEY "1")(= KEY ""))
(setq NUM (acad_colordlg 3) ; (acad_truecolordlg 7)
NUM0 62) ;真色彩很少用,程序留给你写吧!
(setq NUM (getstring "\nEnter linetype name:")
NUM0 6)
;;; (setq NUM (SEL_LAY)
;;; NUM0 8)
)
(setq N 0)
;(acet-ui-progress "已经完成:"
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#CHG_COLOR (setq E (ssname SS N)) NUM0 NUM)
(entupd E)
;(acet-ui-progress -1)
(setq N (1+ N))
)
;(acet-ui-progress)
(princ)
)
(defun C:cn (/ SS KEY NUM NUM0 N E LEN)
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(setq NUM (getstring "\nEnter layer name:")
NUM0 8)
(setq N 0)
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#CHG_LAYER (setq E (ssname SS N)) NUM0 NUM)
(entupd E)
(setq N (1+ N))
)
(princ)
)
(defun C:chl (/ SS KEY NUM NUM0 NUM1 N E LEN)
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(setq NUM "HIDDEN2"
NUM0 6)
(setq N 0)
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#CHG_LINETYPE (setq E (ssname SS N)) NUM0 NUM)
(entupd E)
(setq N (1+ N))
)
(princ)
)
(defun C:chtl (/ SS KEY NUM NUM0 NUM1 N E LEN)
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(setq NUM "HIDDEN"; (getstring "\nEnter linetype name:")
NUM0 8)
(setq N 0)
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#CHG_HIDDEN_TO (setq E (ssname SS N)) NUM0 NUM)
(entupd E)
(setq N (1+ N))
)
(princ)
)
(defun C:cct (/ SS KEY NUM NUM0 N E LEN)
(prompt "\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(prompt "\nSelect original colour:")
(setq NUM1 (acad_colordlg 1)
NUM0 62)
(prompt "\nSelect colour change to:")
(setq NUM (acad_colordlg 1))
(setq N 0)
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#CHG_COLOR_TO (setq E (ssname SS N)) NUM0 NUM NUM1)
(entupd E)
(setq N (1+ N))
)
(princ)
)