(defun c:posl (/) ; (*ERROR* E1 EL EN ET OA_CTR OLDERR OLD_AL P P1 P2 POSLERR TX TX_1 TX_1-1 TX_2 TX_2-1 TX_3 TX_3-1 TX_4 TX_4-1) (setq el (entsel) e1 (car el) p1 (cadr el) en (entget e1) et (cdr (Assoc '0 en)) bl_mark nil p nil old_al nil olderr *error* *error* poslerr ) ;_ Ende von setq (setvar "cmdecho" 0) (al_list) (if (/= oa_ctr 0) (progn (setq old_al (reverse old_al)) (setq p2 (getpoint p1 "\nNach Punkt :")) (command "_mleader" p1 p2) (while old_al (setq tx (car old_al)) (command tx) (setq old_al (cdr old_al)) ) ;_ Ende von while (command "") ) ;_ Ende von progn (progn (princ "\nElement hat keine Attribute !") (if (= et "INSERT") (progn (setq tx_1 (cdr (assoc '2 en)) ) ;_ Ende von setq ) ;_ Ende von progn ) ;_ Ende von if (setq p2 (getpoint p1 "\nNach Punkt :")) (command "_mleader" p1 p2) (if (or (= tx_1 nil) (= tx_1 "")) (setq tx_1 "Textzeile 1") ) ;_ Ende von if (setq tx_1-1 (getstring T (strcat "\nText 1 <" tx_1 "> :"))) (if (and (/= (strcase tx_1) "X") (/= (strcase tx_1-1) "X")) (Progn (if (and (= tx_1-1 "") (/= tx_1 "Textzeile 1")) (command tx_1) (Progn (command tx_1-1) (setq tx_1 tx_1-1)) ) ;_ Ende von if ) ;_ Ende von Progn (setq tx_1 "") ) ;_ Ende von if (if (or (= tx_2 nil) (= tx_2 "")) (setq tx_2 "Textzeile 2") ) ;_ Ende von if (setq tx_2-1 (getstring T (strcat "\nText 2 <" tx_2 "> :"))) (if (and (/= (strcase tx_2) "X") (/= (strcase tx_2-1) "X")) (Progn (if (and (= tx_2-1 "") (/= tx_2 "Textzeile 2")) (command tx_2) (Progn (command tx_2-1) (setq tx_2 tx_2-1)) ) ;_ Ende von if ) ;_ Ende von Progn (setq tx_2 "") ) ;_ Ende von if (if (or (= tx_3 nil) (= tx_3 "")) (setq tx_3 "Textzeile 3") ) ;_ Ende von if (if (and (/= (strcase tx_2-1) "X") (/= tx_2 "")) (Progn (setq tx_3-1 (getstring T (strcat "\nText 3 <" tx_3 "> :"))) (if (and (/= (strcase tx_3) "X") (/= (strcase tx_3-1) "X")) (Progn (if (and (= tx_3-1 "") (/= tx_3 "Textzeile 3")) (command tx_3) (Progn (command tx_3-1) (setq tx_3 tx_3-1)) ) ;_ Ende von if ) ;_ Ende von Progn (setq tx_3 "") ) ;_ Ende von if (if (or (= tx_4 nil) (= tx_4 "")) (setq tx_4 "Textzeile 4") ) ;_ Ende von if (if (/= (strcase tx_3-1) "X") (progn (setq tx_4-1 (getstring T (strcat "\nText 4 <" tx_4 "> :"))) (if (and (/= (strcase tx_4) "X") (/= (strcase tx_4-1) "X")) (Progn (if (and (= tx_4-1 "") (/= tx_4 "Textzeile 4")) (command tx_4) (Progn (command tx_4-1) (setq tx_4 tx_4-1)) ) ;_ Ende von if ) ;_ Ende von Progn (setq tx_4 "") ) ;_ Ende von if ) ;_ Ende von progn ) ;_ Ende von if ) ;_ Ende von Progn ) ;_ Ende von if (if (= (getvar "cmdactive") 1) (Command "") ) ;_ Ende von if ) ;_ Ende von progn ) ;_ Ende von if (if (/= (getvar "cmdactive") 0) (Command "") ) ;_ Ende von if (princ) ) ;_ Ende von defun (defun al_list (/ e_name e_list cont) (setq oa_ctr 0 cont T e_name e1 ) ;_ Ende von setq (while cont (if (setq e_name (entnext e_name)) (progn (setq e_list (entget e_name)) (if (and (= (cdr (assoc 0 e_list)) "ATTRIB") (/= (logand (cdr (assoc 70 e_list)) 2) 2) ) ;_ Ende von and (progn (if old_al (progn (setq e_list (cdr (assoc 1 e_list))) (setq old_al (cons e_list old_al)) ) ;_ Ende von progn (progn (setq e_list (cdr (assoc 1 e_list))) (setq old_al (list e_list)) ) ;_ Ende von progn ) ;_ Ende von if (setq oa_ctr (1+ oa_ctr)) ; count the number of old atts ) ;_ Ende von progn ;; else, exit (setq cont nil) ) ;_ Ende von if ) ;_ Ende von progn (setq cont nil) ) ;_ Ende von if ) ;_ Ende von while ) ;_ Ende von defun (defun poslerr (s) ; If an error (such as CTRL-C) occurs ; while this command is active... (if (= s "quit / exit abort") (princ "\nElement hat keine Attribute !") (progn (if (/= s "Function cancelled") (princ (strcat "\nFehler: " s)) ) ;_ Ende von if ) ;_ Ende von progn ) ;_ Ende von if (setq *error* olderr) ; restore old *error* handler (princ) ) ;_ Ende von defun (princ "\n'posl' Script aktualisiert von Andyt 29.09.2006\nStarten mit dem Befehl 'posl'") (princ)