(defun c:plc () (setq auswahl (car(entsel "\nPolylinie/Linie/Bogen wählen: "))) (if (=(cdr(assoc 0(entget auswahl))) "LWPOLYLINE") (progn (command "_offset" pause auswahl pause "") (setq versobj (entlast)) (command "_line" (cdr(assoc 10(entget auswahl))) (cdr(assoc 10(entget versobj))) "") (setq VBO1 (entlast)) (command "_line" (cdr(assoc 10(reverse(entget auswahl)))) (cdr(assoc 10(reverse(entget versobj)))) "") (setq VBO2 (entlast)) (command "_pedit" auswahl "V" VBO1 VBO2 VERSOBJ "" "" ) (exit) );end progn );end if (if (=(cdr(assoc 0(entget auswahl))) "LINE") (progn (command "_offset" pause auswahl pause "") (setq versobj (entlast)) (command "_line" (cdr(assoc 10(entget auswahl))) (cdr(assoc 10(entget versobj))) "") (setq VBO1 (entlast)) (command "_line" (cdr(assoc 11(entget auswahl))) (cdr(assoc 11(entget versobj))) "") (setq VBO2 (entlast)) (command "_pedit" auswahl "J" "V" VBO1 VBO2 VERSOBJ "" "" ) (exit) );end progn );end if (if (=(cdr(assoc 0(entget auswahl))) "ARC") (progn (command "_offset" pause auswahl pause "") (setq versobj (entlast)) (command "_line" (polar (cdr(assoc 10 (entget auswahl))) ;Mittelpunkt (cdr(assoc 50 (entget auswahl))) ;Winkel (cdr(assoc 40 (entget auswahl))) ;Radius );end polar (polar (cdr(assoc 10 (entget versobj))) ;Mittelpunkt (cdr(assoc 50 (entget versobj))) ;Winkel (cdr(assoc 40 (entget versobj))) ;Radius );end polar "");end linie (setq VBO1 (entlast)) (command "_line" (polar (cdr(assoc 10 (entget auswahl))) ;Mittelpunkt (cdr(assoc 51 (entget auswahl))) ;Winkel (cdr(assoc 40 (entget auswahl))) ;Radius );end polar (polar (cdr(assoc 10 (entget versobj))) ;Mittelpunkt (cdr(assoc 51 (entget versobj))) ;Winkel (cdr(assoc 40 (entget versobj))) ;Radius );end polar "");end linie (setq VBO2 (entlast)) (command "_pedit" auswahl "J" "V" VBO1 VBO2 VERSOBJ "" "" ) (exit) );end progn );end if (alert "kein passendes Objekt gewählt!") )