Hallo, meine gesammelten Werke zum Thema Konstruktionslinien. Ein Problem ist noch: Beim Abbruch mit ESC-Taste bleibt der Layer "hilfslin_018" aktuell! Ich habe das Lisp nach Angaben von Cadmium um folgenden Zeilen erweitert. command "_undo" "_m" Ansgar Lieth 04.03.05 (defun c:hh() ;erzeugt eine horizontale Hilfslinie im gewählten Punkt (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (setq pt (getpoint)) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "_h" pt "") (setvar "CLAYER" altlay) (princ) ) (defun c:hv() ;erzeugt eine vertikale Hilfslinie im gewählten Punkt (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (setq pt (getpoint)) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "_v" pt "") (setvar "CLAYER" altlay) (princ) ) (defun c:hk() ;erzeugt ein Hilfslinienkreuz im gewählten Punkt (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (setq pt (getpoint)) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "_h" pt "") (command "_xline" "_v" pt "") (setvar "CLAYER" altlay) (princ) ) (defun c:he() ;erzeugt eine Hilfslinie am gewählten Element (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (setq en (nentselp)) (setq p1 (osnap (cadr en) "_mid") p2 (osnap (cadr en) "_end")) (command "_xline" p1 p2 "") (setvar "CLAYER" altlay) (princ) ) (defun c:hm() ;erzeugt eine Hilfslinie zwischen zwei gewählten Elementen (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (setq en (nentselp)) (setq p1 nil) (setq p1 (osnap (cadr en) "_end")) (setq en (nentselp)) (setq p2 nil) (setq p2 (osnap (cadr en) "_end")) (setq win (angle p1 p2)) (setq d (distance p1 p2)) (setq dh (/ d 2)) (setq mp (polar p1 (+ win (DTR 0)) dh)) (command "_xline" "_v" mp "") (setvar "CLAYER" altlay) (princ) ) (defun c:hw() ;erzeugt eine Hilfslinie mit Winkel (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "w" pause pause "") (setvar "CLAYER" altlay) (princ) ) (defun c:hwh() ;erzeugt eine Hilfslinie zum Winkelhalbieren (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "ha" pause pause pause "") (setvar "CLAYER" altlay) (princ) ) (defun c:ha() ;erzeugt eine Hilfslinie mit Abstand (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (command "_xline" "a" pause pause pause pause "") (setvar "CLAYER" altlay) (princ) ) (defun c:hl() ;löscht alle Hilfslinien auf dem Layer hilfslin_018 (command "_undo" "_m") (setq as (ssget "X" '((0 . "XLINE")(8 . "hilfslin_018")))) (command "_erase" as "") (princ) ) (defun c:hx() ;erzeugt eine Hilfslinie durch 2 Punkte (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_p" "k" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (princ "\nHilfslinie durch 2 Punkte") (command "_xline" pause pause "") (setvar "CLAYER" altlay) (princ) ) (defun c:hj() ;erzeugt eine Hilfslinie durch 2 Punkte (command "_undo" "_m") (setq altlay (getvar "CLAYER")) (command "_layer" "_m" "hilfslin_018" "_c" "Magenta" "hilfslin_018" "_lw" "0" "hilfslin_018" "") (princ "\nHilfslinie durch 2 Punkte") (command "_xline" pause pause "") (setvar "CLAYER" altlay) (princ) )