;;;Programm zum automatischen Hinzufügen der Brüstungshöhe beim Einfügen von Fenstern ;;;Die Lage des Stempels ist abhängig vom Anklickpunkt der Wandseite (Hinweis: Einfügepunkt der Blockdefinitionen...) ;;;Programm fügt jeweils nur EIN fenster ein -> Wiederaufruf mit return (könnte bei Bedarf durch in eine while-Schleife verändert werden) ;;;Viel Spass - Claudio! (defun BL_make () (command "_-attdef" "" "SILLHEIGHT" "Brüstungshöhe" "0" "_s" "" "P" "_bc" "0,20" TH "0" ) ;Attribut erstellen, SILLHEIGHT liest Brüstungshöhe (command "_-block" BNAM "0,0" (entlast) "") ;Block erstellen (princ)) (defun MVB_make() ;MV-BLOCK-Programm (setq P50 "AecDbDispRepMvBlockRefPlan50" ;Darstellungsverweis für Plan1-50 P100 "AecDbDispRepMvBlockRefPlan100") ;Darstellungsverweis für Plan1-100 (command "_-MVBLOCKDEFINE" "_N" "AEC-FENBH" "_G" ;MV-Block erstellen "_ADD" "_C" P50 "_m" "_c" P50 "_add" "FENBH_50" "" "_ADD" "_C" P100 "_m" "_c" P100 "_add" "FENBH_100" "" "" "" "") (princ)) (defun c:FENBH (/ TH BNAM DICT ) (if (not (tblsearch "BLOCK" "FENBH_50")) (progn (setq TH "10" BNAM "FENBH_50" ) (BL_make))) ;Block abfragen,dann Texthöhe 10, Blockname (if (not (tblsearch "BLOCK" "FENBH_100")) (progn (setq TH "20" BNAM "FENBH_100") (BL_make))) ;Block abfragen,dann Texthöhe 20, Blockname (setq DICT (entget (cdr (assoc 350 (member (cons 3 "AEC_MVBLOCK_DEFS")(entget (namedobjdict))))))) ;Nach Mv-Blockstil suchen (if (not (member (cons 3 "AEC-FENBH") DICT)) (MVB_make) ) ;Wenn nicht gefunden - erstellen (command "_AECWINDOWADD" pause pause "") ;Fenster einfügen starten (command "AecDcWindowLabelAdd" "90" "AEC-FENBH" (entlast) "") ;Fensterstempel (MV-BLOCK) hinzufügen (princ) )