diff --git a/Blocks/AN8.dwg b/Blocks/AN8.dwg new file mode 100644 index 0000000..03224bf Binary files /dev/null and b/Blocks/AN8.dwg differ diff --git a/Blocks/SP8.dwg b/Blocks/SP8.dwg new file mode 100644 index 0000000..5e1c8e3 Binary files /dev/null and b/Blocks/SP8.dwg differ diff --git a/Lisp/ILSModulInsert.lsp b/Lisp/KreiselInsert.lsp similarity index 89% rename from Lisp/ILSModulInsert.lsp rename to Lisp/KreiselInsert.lsp index eaeba31..ca159bd 100644 --- a/Lisp/ILSModulInsert.lsp +++ b/Lisp/KreiselInsert.lsp @@ -1,8 +1,34 @@ -;; ============================================ ;; ModulInsert.lsp ;; Kreisel Modul-Einfügesystem + Smart Connect -;; Version: 4.0 -;; +;; Version: 4.1 (mit DXFM_BLOCKS Unterstützung) +;; ============================================ + +;; ============================================================ +;; TEIL 1: GLOBALE EINSTELLUNGEN (Einfach, aber sicher) +;; ============================================================ + +(if (getenv "DXFM_BLOCKS") + (setq modul-pfad (strcat (getenv "DXFM_BLOCKS") "/")) + (progn + (alert "Umgebungsvariable DXFM_BLOCKS nicht gesetzt!\nBitte zuerst bin\\setenv.bat ausfuehren.") + (exit) + ) + + (progn + (alert + "DXFM_BLOCKS nicht gesetzt!\n\n" + "Bitte fuehren Sie zuerst bin\\setenv.bat aus,\n" + "oder setzen Sie den Pfad manuell mit:\n" + "(setenv \"DXFM_BLOCKS\" \"C:/Users/y.wang/Documents/dxfmakros/Blocks/")" + ) + (exit) + ) +) + +;; block-pfad neu setzen +(setq block-pfad (get-block-path)) +(princ (strcat "\n✅ Block-Pfad: " block-pfad)) + ;; Basispunkt: Linker Kreis, linkester Tangentenpunkt (links Mitte) ;; ============================================ @@ -10,6 +36,8 @@ (setq #Kreisel_Abstand 2300.0) (setq #Kreisel_Typ "PIN") + + ;; ============================================ ;; Haupt-Einfügebefehl (Position manuell angeben) ;; ============================================ @@ -220,10 +248,10 @@ (setq oldColor (getvar "CECOLOR")) ;; Linken Kreisblock einfügen - (command "_.INSERT" "AN8" (list (+ x 400.0) y) 1 1 0) - + (command "_.INSERT" (strcat block-pfad "AN8.dwg") (list (+ x 400.0) y) 1 1 0) + ;; Rechten Kreisblock einfügen - (command "_.INSERT" "SP8" (list (+ x 400.0 abstand) y) 1 1 0) + (command "_.INSERT" (strcat block-pfad "SP8.dwg") (list (+ x 400.0 abstand) y) 1 1 0) ;; Tangenten zeichnen (if (not (tblsearch "LAYER" "S_LP")) @@ -302,6 +330,6 @@ ) -(princ "\nModulInsert.lsp geladen (Version 4.0 - Smart Connect)!") +(princ "\nKreiselInsert.lsp geladen (Version 4.0 - Smart Connect)!") (princ "\nBefehle: KreiselInsert, KreiselConnect, KreiselQuick, KreiselParams") (princ) \ No newline at end of file diff --git a/bin/on_start.lsp b/bin/on_start.lsp index f891df5..71c3f78 100644 --- a/bin/on_start.lsp +++ b/bin/on_start.lsp @@ -51,12 +51,12 @@ (princ "\n[SSG_LIB] WARNUNG: VarioFoerderer.lsp nicht gefunden!") ) - ;; ILSModulInsert laden - (if (findfile (strcat lisp-pfad "/ILSModulInsert.lsp")) - (if (ssg-lib-safe-load (strcat lisp-pfad "/ILSModulInsert.lsp")) - (princ "\n[SSG_LIB] ILSModulInsert.lsp geladen.") + ;; KreiselInsert laden + (if (findfile (strcat lisp-pfad "/KreiselInsert.lsp")) + (if (ssg-lib-safe-load (strcat lisp-pfad "/KreiselInsert.lsp")) + (princ "\n[SSG_LIB] KreiselInsert.lsp geladen.") ) - (princ "\n[SSG_LIB] WARNUNG: ILSModulInsert.lsp nicht gefunden!") + (princ "\n[SSG_LIB] WARNUNG: KreiselInsert.lsp nicht gefunden!") ) ;; Tests laden (if (findfile (strcat lisp-pfad "/tests.lsp"))