; Farbe 1 = rot ; Farbe 2 = gelb ; Farbe 3 = grün ; Farbe 4 =cyan ; Farbe 5 =blau ; Farbe 6 = mangenta ; Farbe 7 = weiß ; Farbe 8 = dunkelgrau ; Farbe 9 = hellgrau (defun C:Pr () (setvar "cmdecho" 0) (setting) (setq fa nil) (setq lynam nil) (setq aws (ssget)) (setq dt -1) (repeat (sslength aws) (setq dt (+ dt 1)) (setq ent (ssname aws dt)) (setq el (entget ent)) (setq typ (cdr (assoc 0 el))) (setq fa (cdr (assoc 62 el))) (setq lynam (cdr (assoc 8 el))) (setq Ltyp (cdr (assoc 6 el))) ;(princ "\n" ) ;(princ "Farb Nr. " ) ; (princ fa) ; (princ "\n" ) ;(princ "Layername " ) ; (princ lynam) (if (= T (wcmatch lynam "*DXF_CONTINUOUS_LINE" )) ;Hilfslinien ( progn (if ( = fa 4);cyan entspricht in dxf_export_pro Letter color map auf 4setzen ( progn (hilfsline) ) ) ) );ifzu (if (= T (wcmatch lynam "*DXF_CONTINUOUS_LINE" )) ;Blechfarbe ( progn (if ( = fa 3);grün ( progn (koerperkanten) ) ) ) );ifzu (if (= T (wcmatch lynam "*DXF_CONTINUOUS_LINE" )) ;Körperkanten ( progn (if ( = fa 7);weiß ( progn (koerperkanten) ) ) ) );ifzu (if (= T (wcmatch lynam "*DXF_AXIS" )) ;Mittellinie ;( progn ; (if ( = fa 2);gelb ; ( progn ; (mittelline) ; ) ;) ;) ( progn (mittelline) ) );ifzu (if (= T (wcmatch lynam "*DXF_HIDDEN_LINE" )) ;verdeckt ;( progn ;(if ( = fa 8);dunkelgrau ( progn (verdeckt) ) ;) ;(verdeckt)) );ifzu (if (= T (wcmatch lynam "DEFAULT_3" )) ;Phantom ( progn (phantom) ) );ifzu (if (= T (wcmatch lynam "*DXF_CONTINUOUS_LINE" )) ;Tangentiallinie ( progn (if ( = fa 9) ( progn (tangente);hellgrau ) ) ) );ifzu (if (= T (wcmatch lynam "*DXF_TEXT" )) ;Text ( progn (if ( = fa 5);blau ( progn (text) ) ) ) );ifzu (if (= T (wcmatch lynam "*DXF_FORMAT" )) ;Zeichnungsrahmen ( progn (if ( = fa 2);gelb ( progn (text) ) ) ) );ifzu (if (= T (wcmatch lynam "ZEICHNUNGSBEMASSUNGEN" )) ;bemassung ( progn (bem) ) );ifzu (if (= T (wcmatch lynam "*DXF_DIMENSION" )) ;bemassung ( progn (bem) ) );ifzu (if (= T (wcmatch lynam "*DXF_HATCH" )) ;SCHRAFFUR ( progn (hatch) ) );ifzu (if (= T (wcmatch lynam "0" )) ;Schnittbegrenzung ( progn (if ( = fa 4) ( progn (begrenzung) ) ) ) );ifzu (if (= T (wcmatch lynam "0" )) ;Phantom auf layer 0 ( progn (if ( = Fa 9) ( progn (phantom) ) ) ) );ifzu (if (= T (wcmatch lynam "0" )) ;Schnittverlauf auf layer 0 ( progn (if ( = Fa 7) ( progn (if ( = ltyp "CENTER") ( progn (SCHNITTverlauf) ) ) ) ) ) );ifzu (if (= T (wcmatch lynam "DEFAULT_2" )) ;Phantom auf layer Default_2 ( progn (if ( = ltyp "PHANTOM") ( progn (phantom) ) ) ) );ifzu ) ;repeatzu ;(bp);Bemaßung Überschreiben (setvar "cmdecho" 1) );defzuENDE (defun koerperkanten () ;anpassung Koerperkante ;(princ "---Kante-----") (if (= typ "LWPOLYLINE") (progn (command "_change" ent "" "ei" "la" "AM_0" "lty" "vonLayer" "F" "vonLayer" "" ) ;lwpolilinienanpassung ) ) (if (= typ "SPLINE") (progn (command "_change" ent "" "ei" "la" "AM_0" "lty" "vonLayer" "F" "vonLayer" "" ) ;SPLINEanpassung ) ) (setq el (subst (cons 62 256)(assoc 62 el)el ) );Farbe auf vonLayer gestellt (setq el (subst (cons 6 "vonlayer")(assoc 6 el)el ) ) ;Linientyp auf VonLayer (setq el (subst (cons 8 "AM_0")(assoc 8 el)el ) );Layer wechseln (entmod el) (princ el) ) (defun hilfsline () ;(princ "---hilfsline-----") anpassung Hilfslinie -gewinde Schnittbegrenzung (command "_change" ent "" "ei" "la" "AM_4" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun mittelline () ;(princ "---mittellinie-----") anpassung Mittellinie (setq el (subst (cons 62 256)(assoc 62 el)el ) );Farbe auf vonLayer gestellt (setq el (subst (cons 6 "vonlayer")(assoc 6 el)el ) ) ;Linientyp auf VonLayer (setq el (subst (cons 8 "AM_7")(assoc 8 el)el ) );Layer wechseln (entmod el) ) (defun verdeckt () ;(princ "---verdeckt-----") anpassung unsichtbare linien (command "_change" ent "" "ei" "la" "AM_3" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun phantom () ;(princ "---Phantom-----") anpassung Phantomlinien (command "_change" ent "" "ei" "la" "AM_11" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun tangente () ;(princ "---Tangente-----") anpassung Tangentiallinien (command "_change" ent "" "ei" "la" "AM_4" "lty" "vonLayer" "F" "9" "" ) ;Farbe Linientyp und Layer setzen ) (defun text () ;(princ "---Text-----") anpassung Text (command "_change" ent "" "ei" "la" "AM_6" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun bem () ;(princ "---Bemaßung-----") anpassung Bemasungen (command "_change" ent "" "ei" "la" "AM_5" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ;(setq el (subst (cons 3 "AM_DIN")(assoc 3 el)el ) ); ;(entmod el) ) (defun hatch () ;(princ "---Schraffur-----") anpassung Schraffuren (command "_change" ent "" "ei" "la" "AM_8" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun begrenzung () ;(princ "---Schnittbegrenzug-----") anpassung Schnittbegrenzung (command "_change" ent "" "ei" "la" "AM_4" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun SCHNITTverlauf () ;(princ "---Schnittverlauf-----") anpassung Schnittverlauf (command "_change" ent "" "ei" "la" "AM_10" "lty" "vonLayer" "F" "vonLayer" "" ) ;Farbe Linientyp und Layer setzen ) (defun setting () ;Am -Layerstruktur setzen (command "_-amlayer" "_o" "CON1") (command "_-amlayer" "_o" "HIDW") (command "_-amlayer" "_o" "HLIN") (command "_-amlayer" "_o" "DILI") (command "_-amlayer" "_o" "TXT3") (command "_-amlayer" "_o" "CENW") (command "_-amlayer" "_o" "HATC") (command "_-amlayer" "_o" "PHAN") (command "_-amlayer" "_o" "VPLI") (setvar "ltscale" 1) ; (command "regen") ) (defun bp () (setq farbe "_dimclrt") (setq wert 2) (command "_dimoverride" farbe wert "" ) )