Hab noch was auf meine Platte gefunden:
Für Layeraus:
(defun c:Layer-wie( / LAYER OK)
(while (not OK)
(if(=(setq LAYER (getstring 'T "Alle Layer aus, außer: <Von Objekt>: ")) "")
(setq LAYER(cdr(assoc 8 (entget(car(nentsel))))))
)
(if (not (setq OK (tblsearch "LAYER" LAYER)))
(princ "\n Eingegebener Layer existiert nicht.\n")
)
)
(if OK
(while (setq EINTRAG (tblnext "LAYER" (null EINTRAG)))
(setq EINTRAG(entget(tblobjname "LAYER" (cdr(assoc 2 EINTRAG)))))
(if(/=(strcase(cdr(assoc 2 EINTRAG)))(strcase LAYER))
(entmod(subst (cons 62 (* -1 (abs(cdr(assoc 62 EINTRAG)))))(assoc 62 EINTRAG)EINTRAG))
)
)
)
(princ)
)
Für Layer frieren
(defun c:Layer-wie-FR( / LAYER OK)
(while (not OK)
(if(=(setq LAYER (getstring 'T "Alle Layer aus, außer: <Von Objekt>: ")) "")
(setq LAYER(cdr(assoc 8 (entget(car(nentsel))))))
)
(if (not (setq OK (tblsearch "LAYER" LAYER)))
(princ "\n Eingegebener Layer existiert nicht.\n")
)
)
(if OK
(progn
(setvar "CLAYER" LAYER)
(while (setq EINTRAG (tblnext "LAYER" (null EINTRAG)))
(setq EINTRAG(entget(tblobjname "LAYER" (cdr(assoc 2 EINTRAG)))))
(if(/=(strcase(cdr(assoc 2 EINTRAG)))(strcase LAYER))
(entmod(subst (cons 70 (logior (cdr(assoc 70 EINTRAG))1)) (assoc 70 EINTRAG)EINTRAG))
)
)
)
)
(princ)
)
------------------
- Thomas -
"Bei 99% aller Probleme ist die umfassende Beschreibung des Problems bereits mehr als die Hälfte der Lösung desselben."
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP