- (defun c:tt (/ doc la)
- (if (and (ssget)
- (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
- (setq la (vla-get-Name(vla-get-ActiveLayer doc)))
- )
- (progn
- (vlax-for e (vla-get-activeselectionset doc)
- (if (= 256 (vla-get-Color e))
- (vla-put-Color e (vla-get-Color (vla-Item (vla-get-Layers doc)(vla-get-Layer e))))
- )
- (vla-put-Layer e la)
- )
- )
- )
- )
|