diff --git a/.vscode/settings.json b/.vscode/settings.json index 5d3db9b..c8c564f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { "iis.configDir": "", "specstory.cloudSync.enabled": "never" -} \ No newline at end of file +} diff --git a/bin/on_start.lsp b/bin/on_start.lsp index 18480d9..bcf2579 100644 --- a/bin/on_start.lsp +++ b/bin/on_start.lsp @@ -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") diff --git a/lib/elemente/omniflo_boegen.py b/lib/elemente/omniflo_boegen.py index 45d1ad9..1b1e415 100644 --- a/lib/elemente/omniflo_boegen.py +++ b/lib/elemente/omniflo_boegen.py @@ -6,8 +6,6 @@ import wx import PyRx as Rx -import PyDb as Db -import PyEd as Ed from elemente.omniflo import ( load_boegen, diff --git a/requirements.txt b/requirements.txt index 969f874..9409f5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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