- (defun c:tolayer (/ doc ss sn)
- (setq doc (vla-get-activedocument (vlax-get-acad-object)))
- (vla-endundomark doc)
- (vla-startundomark doc)
- (cond
- ((not (tblsearch "LAYER" "HILMOT-ARROWS"))
- (princ (strcat "\nLayer < HILMOT-ARROWS > is not found !")))
- ((and (princ "\nSelect object to move to layer < HILMOT-ARROWS >")
- (setq ss (ssget "_:L" '((0 . "~VIEWPORT"))))
- )
- (while (setq sn (ssname ss 0))
- (entmod (append (entget sn) '((8 . "HILMOT-ARROWS"))))
- (ssdel sn ss))
- )
- )
- (vla-endundomark doc)
- (princ)
- ) (vl-load-com)
|