IF-Abfrage war falsch und wurde korrigiert.

This commit is contained in:
2026-05-11 12:17:24 +02:00
parent 3d944f85dc
commit eb9edaca3c
+10 -22
View File
@@ -4,37 +4,25 @@
;; ============================================
;; ============================================================
;; TEIL 1: GLOBALE EINSTELLUNGEN (Einfach, aber sicher)
;; TEIL 1: GLOBALE EINSTELLUNGEN
;; ============================================================
(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)
)
(setq block-pfad (getenv "DXFM_BLOCKS"))
(if (or (null block-pfad) (= block-pfad ""))
(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)
(setq block-pfad "C:/Users/y.wang/Documents/dxfmakros/Blocks/") ;; Fallback oder manuell
(alert (strcat "Umgebungsvariable DXFM_BLOCKS nicht gefunden.\nNutze Standardpfad: " block-pfad))
)
(setq block-pfad (strcat (vl-string-right-trim "/" (vl-string-translate "\\" "/" block-pfad)) "/"))
)
;; block-pfad neu setzen
(setq *block-path* (getenv "DXFM_BLOCKS"))
(princ (strcat "\n✅ Block-Pfad: " block-pfad))
;; Basispunkt: Linker Kreis, linkester Tangentenpunkt (links Mitte)
;; ============================================
(setq *block-path* block-pfad)
(princ (strcat "\n✅ Block-Pfad aktiv: " block-pfad))
;; Standardwerte initialisieren
(setq #Kreisel_Abstand 2300.0)
(setq #Kreisel_Typ "PIN")
(if (null #Kreisel_Abstand) (setq #Kreisel_Abstand 2300.0))
(if (null #Kreisel_Typ) (setq #Kreisel_Typ "PIN"))