(defun C:g-wl ()(g_sv)(setq p2 (g_in nil "\nEndpunkt der Umfangslinie:" (list 0 0 0 1 "END"))
 p1 (g_in p2 "\nPunkt auf Mittellinie:" (list 0 0 0 512 "NAE")))(command "LINIE" p2 "LOT" p1 (setq p1 (getvar "lastpoint")) "Z" "Z" "")
(setq dis (distance p1 p2) rang (angtos (angle p1 p2) 0 0) )(command "EINFšGE" "din370" p1 dis dis rang))(defun C:g-kop ( / ss)(g_sv)
(prompt "\nG-Kopieren ")(setq ss (ssget))(setvar "cmdecho" 1)(command "WAHL" ss "" "KOPIEREN" ss "" "M" pause pause)(setvar "cmdecho" 0)(princ))
(defun g-rei ( a / ss)(prompt "\nG-Reihe ")(g_sv)(setq ss (ssget))(setvar "cmdecho" 1)(command "WAHL" ss "" "REIHE" ss "" a pause pause pause)
(setvar "cmdecho" 0)(princ))(defun g-sra ( ansi a w / ss)(prompt "\nG-Schraffur ")(g_sv)(setq ss (ssget))(command "WAHL" ss "" 
 "SCHRAFF" ansi a w ss "" "EIGŽNDR" "L" "" "LA" (nth 8 v-lay) "" "WAHL" ss "")(princ))(defun c:g-dre ( / ss)(prompt "\nG-Kopieren + Drehen ")(g_sv)
(setq ss (ssget))(command "KOPIEREN" ss "" "0,0" "0,0")(setvar "cmdecho" 1)(command "DREHEN" ss "" pause pause)(setvar "cmdecho" 0)
(command "WAHL" (entlast) "")(princ))(defun c:g-dmo ( / ss)(prompt "\nG-Drehen + Schieben ")(g_sv)(setq ss (ssget))(while (= T T)(setvar "cmdecho" 1)
(command "SCHIEBEN" ss "" pause pause "DREHEN" ss "" pause pause)(setvar "cmdecho" 0))(princ))(defun C:g-bem ()(if (= g-bema nil)
(progn(setq g-bema T)(prompt "\nAutoCAD-Bemassung:"))(progn (setq g-bema nil)(prompt "\nGenius-Bemassung:")))(princ))
(defun g-dma ( com / ) (princ "\nGenius-Bemassung:")(Prompt " ")(princ a) (com))(defun g-bem2 ( a /)(g_sv)(cond
((= g-bema T)(progn(princ "\nAutoCAD-Bemassung:")(command "BEM" a)))((= a "VERT")(if (not c:MASSY)(load (strcat pfad "dinmass")))(g-dma C:MASSY))
((= a "HOR")(if (not c:MASSY)(load (strcat pfad "dinmass")))(g-dma C:MASSX))
((= a "AUSRICHTEN")(if (not c:MASSY)(load (strcat pfad "dinmass")))(g-dma C:MASSA))
((= a "DURCHMESSER")(if (not c:MASSY)(load (strcat pfad "dinmass")))(g-dma C:MASC))
((= a "RADIUS")(if (not c:g-masr)(load (strcat pfad "dinmas2")))(g-dma C:g-masr))((= a "WINKEL")(command "BEM" a))
((= a "BEMASSO")(if (not c:g-asso)(load (strcat pfad "dinmako")))(g-dma C:g-asso))
((= a "FšHRUNG")(progn(if (not les)(load (strcat pfad "dina")))(ZIEH "" 4)))))(defun g-pick ()(prompt "+/-/Objekt w„hlen:" )(g-size "pickbox"))
(defun g-aper ()(prompt "+/-/Punkt antippen:")(g-size "aperture"))(defun g-size (p / k)(while (if (member (setq k (cadr (grread))) '(43 45))
 (setvar p (+ (getvar p)(cadr (assoc k '((43 1)(45 -1)))))) ))(cond (( listp k) K) ((prin1))))(defun g-bli ( / l i o o2 n2)(g_sv)
(setq g-nam (strcase (g_in g-nam "\nAnfangszeichen des Blocks:" "")) l (strlen g-nam))(setq i (tblnext "BLOCK" T) o nil o2 nil)(while (/= i nil)
(setq n2 (cdr (assoc 2 i)))(if (>= (strlen n2) l)(progn(if (= g-nam (substr n2 1 l))(progn
(setq o2 (g_in o2 (strcat "\n Block (N=Weitersuchen):" n2 ": ") "J"))(if (= (strcase o2) "J")(setq i nil o T))))))
(if (/= nil i)(setq i (tblnext "BLOCK"))))(if (/= o T)(prompt "\nKein Block vorhanden !"))(setq n2 n2))(defun c:G-ZF ( / p1 p2 p3 )(g_sv)
(if (> (length (vports)) 1)(progn (setq p1 (getpoint "\n1.Ecke:") p2 (getcorner p1 "\n2.Ecke:") p3 (getpoint "\nZoomfenster 2x antippen:"))
 (command "ZOOM" "F" p1 p2))(prompt "\nError: nur 1 Afenster"))(princ))(defun C:FAKTOR ()(g_sv)(terpri)
(setq g_si (g_in g_si "In welchen Abst„nden soll gesichert werden in Minuten (0=ohne):" 15))(setvar "useri3" g_si)
(setq g_f (g_in g_f "Schriftgr”ssenfaktor fr SST-Texte:" 1.0))(command "BEM" "BEMFKTR" g_f "EXIT"  "LTFAKTOR" g_f)
(setq g_l (g_in g_l "Maximale Stellenzahl nach dem Komma bei Vermassung:" 3))(setvar "useri2" g_l)
(setq g_g (g_in g_g "Globaler Massfaktor fr SST-Masse:" 1.0))(command "BEM" "BEMGFLA" g_g "EXIT") 
(setq g_if (g_in g_if "Normteilinformation mit Infopunkt(0)/Klartext(1)/ohne(2):" 0))(setvar "useri1" g_if)(princ))(princ)
