This commit is contained in:
2026-06-02 10:00:42 +02:00
4 changed files with 45 additions and 8 deletions
+38
View File
@@ -63,6 +63,44 @@
;; DBLCLKEDIT deaktivieren (Block-Editor nicht bei Doppelklick oeffnen)
(setvar "DBLCLKEDIT" 0)
;; PyRx BRX-Plugin laden (benoetigt fuer PYLOAD-Befehl)
(if menu-pfad
(progn
(setq pyrx-pfad (strcat menu-pfad "/.venv/Lib/site-packages/pyrx"))
;; BricsCAD-Version aus ACADVER ermitteln (z.B. "25.0.0.0" -> "25")
(setq acadver-str (getvar "ACADVER"))
(setq ver-punkt (vl-string-search "." acadver-str))
(setq ver-major (if ver-punkt
(substr acadver-str 1 ver-punkt)
"25"
))
(setq brx-datei (strcat pyrx-pfad "/RxLoaderV" ver-major ".0.brx"))
(if (findfile brx-datei)
(progn
(arxload brx-datei)
(princ (strcat "\n[SSG_LIB] PyRx BRX geladen (V" ver-major "): " brx-datei))
)
(progn
(princ (strcat "\n[SSG_LIB] FEHLER: PyRx BRX nicht gefunden: " brx-datei))
(princ "\n[SSG_LIB] Versuche Fallback-Versionen...")
(foreach ver '("26" "25" "24")
(if (not (= ver ver-major))
(progn
(setq brx-fallback (strcat pyrx-pfad "/RxLoaderV" ver ".0.brx"))
(if (findfile brx-fallback)
(progn
(arxload brx-fallback)
(princ (strcat "\n[SSG_LIB] PyRx BRX Fallback geladen (V" ver "): " brx-fallback))
)
)
)
)
)
)
)
)
)
;; Python-Module laden (PyRx)
(if menu-pfad
(foreach pymod '("eckrad" "kreisel" "dblclick" "omniflo" "omniflo_boegen" "omniflo_weichen")
-2
View File
@@ -6,8 +6,6 @@
import wx
import PyRx as Rx
import PyDb as Db
import PyEd as Ed
from elemente.omniflo import (
load_boegen,
+6 -5
View File
@@ -1,9 +1,10 @@
# Python-Abhaengigkeiten
# Installieren mit: pip install -r requirements.txt
# PyRx - Python fuer AutoCAD/BricsCAD (in-process API)
cad-pyrx >= 1.2.0
ezdxf==1.4.1
pytest==9.0.2
# Beispiel-Abhaengigkeiten anpassen nach Bedarf:
# pydantic >= 2.0.0
# pytest >= 9.0.0
# PyRx - BricsCAD Python API (liefert .brx Plugin-Dateien und Python-Wrapper)
# WICHTIG: Benoetigt Python 3.12 (py -3.12 -m venv)
cad-pyrx >= 2.0.0
wxpython >= 4.2.0