From a2d6571ab99c40265136882db18571770428d3cc Mon Sep 17 00:00:00 2001 From: Michael Stangl Date: Wed, 10 Jun 2026 17:47:26 +0200 Subject: [PATCH] =?UTF-8?q?Omniflo=20csv=20Export=20erste=20Fassung.=20H?= =?UTF-8?q?=C3=B6he=20und=20Winkel=20in=20die=20Attribute=20erg=C3=A4nzt.?= =?UTF-8?q?=20Dcl=20Dialoge=20erm=C3=B6glichen=20Eingabe=20von=20H=C3=B6he?= =?UTF-8?q?=20und=20Drehung.=20Neuer=20Men=C3=BC-eintrag=20bearbeiten=20in?= =?UTF-8?q?=20Omniflo=20dazu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lisp/OmniModulInsert.lsp | 397 +++++++++++++++++++++++++++++---------- cfg/attradd.cfg | 5 + dcl/omniflo_boegen.dcl | 13 ++ dcl/omniflo_weichen.dcl | 13 ++ lib/export_csv.py | 6 +- lib/export_sivas.py | 6 +- menu/SSG_LIB.mnu | 3 +- 7 files changed, 339 insertions(+), 104 deletions(-) diff --git a/Lisp/OmniModulInsert.lsp b/Lisp/OmniModulInsert.lsp index 6c7be8d..ef03d95 100644 --- a/Lisp/OmniModulInsert.lsp +++ b/Lisp/OmniModulInsert.lsp @@ -443,11 +443,16 @@ ;; --- Bogen-Auswahl-Dialog oeffnen --- ;; winkel = KurvenWinkel (90, 67.5, 45, 22.5, 180) -;; Rueckgabe: gewaehlter Bogen-Eintrag (alist) oder nil bei Abbruch -(defun omni:bogen-dialog (winkel / dcl-pfad dat boegen-liste - profil-liste ergebnis) +;; init-hoehe / init-drehung = Vorbelegung (optional, fuer Edit-Modus) +;; Rueckgabe: (eintrag hoehe drehung) oder nil bei Abbruch +(defun omni:bogen-dialog (winkel init-hoehe init-drehung / dcl-pfad dat boegen-liste + profil-liste ergebnis dlg-hoehe dlg-drehung) (if (null *OMNI-BOEGEN*) (omni:load-data)) + ;; Defaults + (if (null init-hoehe) (setq init-hoehe "2000")) + (if (null init-drehung) (setq init-drehung "0")) + ;; Boegen nach Winkel filtern (setq boegen-liste (omni:filter *OMNI-BOEGEN* "KurvenWinkel" winkel)) (if (null boegen-liste) @@ -477,6 +482,10 @@ (end_list) (set_tile "bogenart" "0") + ;; Hoehe und Drehung initialisieren + (set_tile "val_hoehe" init-hoehe) + (set_tile "val_drehung" init-drehung) + ;; Startwerte anzeigen (omni:bogen-dlg-update "0") @@ -485,15 +494,19 @@ ;; OK/Abbrechen (action_tile "accept" - "(setq ergebnis (atoi (get_tile \"bogenart\"))) (done_dialog 1)") + (strcat + "(setq ergebnis (atoi (get_tile \"bogenart\")))" + "(setq dlg-hoehe (get_tile \"val_hoehe\"))" + "(setq dlg-drehung (get_tile \"val_drehung\"))" + "(done_dialog 1)")) (action_tile "cancel" "(done_dialog 0)") (start_dialog) (unload_dialog dat) - ;; Gewaehlten Eintrag zurueckgeben + ;; Gewaehlten Eintrag mit Hoehe/Drehung zurueckgeben (if ergebnis - (nth ergebnis *OMNI-DLG-BOEGEN*) + (list (nth ergebnis *OMNI-DLG-BOEGEN*) dlg-hoehe dlg-drehung) nil ) ) @@ -508,46 +521,46 @@ ;; ============================================================ ;; --- Omniflo / Boegen --- -(defun c:OMNI_APB_630_90 ( / eintrag) - (setq eintrag (omni:bogen-dialog 90)) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_APB_630_90 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 90 nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") ) (princ) ) -(defun c:OMNI_APB_550_675 ( / eintrag) - (setq eintrag (omni:bogen-dialog 67.5)) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_APB_550_675 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 67.5 nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") ) (princ) ) -(defun c:OMNI_APB_630_45 ( / eintrag) - (setq eintrag (omni:bogen-dialog 45)) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_APB_630_45 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 45 nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") ) (princ) ) -(defun c:OMNI_APB_550_225 ( / eintrag) - (setq eintrag (omni:bogen-dialog 22.5)) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_APB_550_225 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 22.5 nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") ) (princ) ) -(defun c:OMNI_APB_650_180 ( / eintrag) - (setq eintrag (omni:bogen-dialog 180)) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_APB_650_180 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 180 nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") ) (princ) @@ -824,11 +837,16 @@ ;; --- Weichen-Auswahl-Dialog oeffnen --- ;; winkel = KurvenWinkel (90, 45, 0, 22.5) ;; weichentyp = "Einzelweiche", "Doppelweiche", "Dreiwegeweiche" oder nil fuer alle -;; Rueckgabe: gewaehlter Weichen-Eintrag (alist) oder nil bei Abbruch -(defun omni:weichen-dialog (winkel weichentyp / dcl-pfad dat basis-liste - profil-liste ergebnis) +;; init-hoehe / init-drehung = Vorbelegung (optional, fuer Edit-Modus) +;; Rueckgabe: (eintrag hoehe drehung) oder nil bei Abbruch +(defun omni:weichen-dialog (winkel weichentyp init-hoehe init-drehung / dcl-pfad dat basis-liste + profil-liste ergebnis dlg-hoehe dlg-drehung) (if (null *OMNI-WEICHEN*) (omni:load-data)) + ;; Defaults + (if (null init-hoehe) (setq init-hoehe "2000")) + (if (null init-drehung) (setq init-drehung "0")) + ;; Weichen nach Winkel filtern (nil = alle Winkel) (if winkel (setq basis-liste (omni:filter *OMNI-WEICHEN* "KurvenWinkel" winkel)) @@ -876,6 +894,10 @@ (end_list) (set_tile "profiltyp" "0") + ;; Hoehe und Drehung initialisieren + (set_tile "val_hoehe" init-hoehe) + (set_tile "val_drehung" init-drehung) + ;; Startwerte anzeigen (omni:weichen-dlg-update "0") @@ -892,15 +914,19 @@ ;; OK/Abbrechen (action_tile "accept" - "(setq ergebnis (atoi (get_tile \"profiltyp\"))) (done_dialog 1)") + (strcat + "(setq ergebnis (atoi (get_tile \"profiltyp\")))" + "(setq dlg-hoehe (get_tile \"val_hoehe\"))" + "(setq dlg-drehung (get_tile \"val_drehung\"))" + "(done_dialog 1)")) (action_tile "cancel" "(done_dialog 0)") (start_dialog) (unload_dialog dat) - ;; Gewaehlten Eintrag zurueckgeben + ;; Gewaehlten Eintrag mit Hoehe/Drehung zurueckgeben (if ergebnis - (nth ergebnis *OMNI-DLG-WEICHEN*) + (list (nth ergebnis *OMNI-DLG-WEICHEN*) dlg-hoehe dlg-drehung) nil ) ) @@ -918,8 +944,10 @@ ;; --- DXF-Datei als Block einfuegen --- ;; sivasnr-str = SivasNr als String (Dateiname ohne .dxf) +;; hoehe = Hoehe in mm als String (wird als HOEHE-Attribut gesetzt) +;; drehung = Drehwinkel in Grad als String (Block-Rotation) ;; Rueckgabe: Einfuegepunkt oder nil bei Abbruch -(defun omni:insert-dxf (sivasnr-str / dxf-pfad data-pfad pt) +(defun omni:insert-dxf (sivasnr-str hoehe drehung / dxf-pfad data-pfad pt angleDeg blockEnt) (setq data-pfad (getenv "DXFM_DATA")) (if (null data-pfad) (progn @@ -938,12 +966,28 @@ (if (null pt) (progn (princ "\n[OMNI] Abgebrochen.") nil) (progn - (ssg-start "OMNI DXF Insert" '(("OSMODE"))) + (ssg-start "OMNI DXF Insert" '(("OSMODE") ("ATTREQ") ("ATTDIA"))) + (setvar "ATTREQ" 0) + (setvar "ATTDIA" 0) - ;; Block einfuegen mit Winkelabfrage (pause) - (command "_.INSERT" dxf-pfad pt "" "" pause) + ;; Drehwinkel aus Dialog verwenden + (setq angleDeg (if drehung (atof drehung) 0.0)) - (princ (strcat "\n[OMNI] " sivasnr-str " eingefuegt.")) + ;; Block einfuegen mit Drehwinkel aus Dialog + (command "_.INSERT" dxf-pfad pt "" "" angleDeg) + + (setq blockEnt (entlast)) + + ;; HOEHE und DREHUNG Attribute setzen + (if (and blockEnt (= (cdr (assoc 0 (entget blockEnt))) "INSERT")) + (ssg-attrib-set-on blockEnt + (list (cons "HOEHE" (if hoehe hoehe "2000")) + (cons "DREHUNG" (if drehung drehung "0")))) + ) + + (princ (strcat "\n[OMNI] " sivasnr-str " eingefuegt." + " Hoehe=" (if hoehe hoehe "2000") + " Drehung=" (if drehung drehung "0"))) (ssg-end) pt ) @@ -956,14 +1000,17 @@ ;; --- Eintrag aus Dialog-Ergebnis einfuegen --- -;; Nimmt einen Eintrag (alist) und fuegt die zugehoerige DXF ein. -(defun omni:insert-from-entry (eintrag / sivasnr-str) - (if eintrag +;; dlg-result = (eintrag hoehe drehung) aus omni:bogen-dialog / omni:weichen-dialog +(defun omni:insert-from-entry (dlg-result / eintrag hoehe drehung sivasnr-str) + (if dlg-result (progn + (setq eintrag (car dlg-result)) + (setq hoehe (cadr dlg-result)) + (setq drehung (caddr dlg-result)) (setq sivasnr-str (omni:sivasid-to-str (omni:val eintrag "Sivasnr"))) (princ (strcat "\n[OMNI] Einfuegen: " (omni:val eintrag "ProfilTyp") " (" sivasnr-str ")")) - (omni:insert-dxf sivasnr-str) + (omni:insert-dxf sivasnr-str hoehe drehung) ) ) ) @@ -974,136 +1021,292 @@ ;; ============================================================ ;; --- Omniflo / Weiche 90 Grad --- -(defun c:OMNI_W90_Einfach ( / eintrag) - (setq eintrag (omni:weichen-dialog 90 "Einzelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W90_Einfach ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 90 "Einzelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_W90_Doppel ( / eintrag) - (setq eintrag (omni:weichen-dialog 90 "Doppelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W90_Doppel ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 90 "Doppelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_W90_Dreiwege ( / eintrag) - (setq eintrag (omni:weichen-dialog 90 "Dreiwegeweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W90_Dreiwege ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 90 "Dreiwegeweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) ;; --- Omniflo / Weiche 45 Grad --- -(defun c:OMNI_W45_Einfach ( / eintrag) - (setq eintrag (omni:weichen-dialog 45 "Einzelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W45_Einfach ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 45 "Einzelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_W45_Doppel ( / eintrag) - (setq eintrag (omni:weichen-dialog 45 "Doppelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W45_Doppel ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 45 "Doppelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_W45_Dreiwege ( / eintrag) - (setq eintrag (omni:weichen-dialog 45 "Dreiwegeweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_W45_Dreiwege ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 45 "Dreiwegeweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) ;; --- Omniflo / Weichen Parallel --- -(defun c:OMNI_WP_Einfach ( / eintrag) - (setq eintrag (omni:weichen-dialog 0 "Einzelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WP_Einfach ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 0 "Einzelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_WP_Doppel ( / eintrag) - (setq eintrag (omni:weichen-dialog 0 "Doppelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WP_Doppel ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 0 "Doppelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_WP_Dreiwege ( / eintrag) - (setq eintrag (omni:weichen-dialog 0 "Dreiwegeweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WP_Dreiwege ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 0 "Dreiwegeweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) ;; --- Omniflo / Weichenkoerper --- -(defun c:OMNI_WK_Einfach ( / eintrag) - (setq eintrag (omni:weichen-dialog 22.5 "Einzelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WK_Einfach ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 22.5 "Einzelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_WK_Doppel ( / eintrag) - (setq eintrag (omni:weichen-dialog 22.5 "Doppelweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WK_Doppel ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 22.5 "Doppelweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_WK_Dreiwege ( / eintrag) - (setq eintrag (omni:weichen-dialog 22.5 "Dreiwegeweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WK_Dreiwege ( / dlg-result) + (setq dlg-result (omni:weichen-dialog 22.5 "Dreiwegeweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) ;; --- Omniflo / Weichenkombinationen --- -(defun c:OMNI_WKomb_Delta ( / eintrag) - (setq eintrag (omni:weichen-dialog nil "Deltaweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WKomb_Delta ( / dlg-result) + (setq dlg-result (omni:weichen-dialog nil "Deltaweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) -(defun c:OMNI_WKomb_Star ( / eintrag) - (setq eintrag (omni:weichen-dialog nil "Sternweiche")) - (if eintrag - (omni:insert-from-entry eintrag) +(defun c:OMNI_WKomb_Star ( / dlg-result) + (setq dlg-result (omni:weichen-dialog nil "Sternweiche" nil nil)) + (if dlg-result + (omni:insert-from-entry dlg-result) (princ "\n[WEICHE] Abgebrochen.") ) (princ) ) +;; ============================================================ +;; OMNIFLO ELEMENT BEARBEITEN +;; Selektiertes Omniflo-Element erneut im Dialog oeffnen, +;; Typ/Hoehe/Drehung aendern und Block ersetzen. +;; ============================================================ + +(defun c:OMNI_EDIT ( / ss sel ent ed attribs bname + artinr hoehe drehung rotation + typ eintrag winkel weichentyp + dlg-result new-eintrag new-hoehe new-drehung + basePoint sivasnr-str dxf-pfad data-pfad angleDeg blockEnt) + + ;; Implied Selection pruefen + (setq ss (ssget "I")) + (if (and ss (= (sslength ss) 1) + (= (cdr (assoc 0 (entget (ssname ss 0)))) "INSERT")) + (setq ent (ssname ss 0)) + ) + + (ssg-start "Omniflo bearbeiten" '(("OSMODE") ("ATTREQ") ("ATTDIA"))) + (setvar "OSMODE" 0) + + ;; 1. Block auswaehlen (falls nicht vorselektiert) + (if (null ent) + (progn + (setq sel (entsel "\nOmniflo-Element auswaehlen: ")) + (if sel (setq ent (car sel))) + ) + ) + (if (null ent) (progn (ssg-end) (exit))) + + (setq ed (entget ent)) + (if (/= (cdr (assoc 0 ed)) "INSERT") + (progn (ssg-emsg "Kein Block ausgewaehlt!") (ssg-end) (exit)) + ) + + ;; 2. Bestehende Attribute lesen + (setq attribs (ssg-attrib-read ent)) + (setq bname (cdr (assoc 2 ed))) + (setq basePoint (cdr (assoc 10 ed))) + (setq rotation (* (/ 180.0 pi) (cdr (assoc 50 ed)))) + + ;; ARTINR = SivasNr, TEILEART = Typ-Erkennung + (setq artinr (cdr (assoc "ARTINR" attribs))) + (setq hoehe (cdr (assoc "HOEHE" attribs))) + (setq drehung (cdr (assoc "DREHUNG" attribs))) + + ;; Fallbacks + (if (null hoehe) (setq hoehe "2000")) + (if (null drehung) (setq drehung (rtos rotation 2 1))) + + ;; 3. Typ bestimmen: Bogen oder Weiche + (if (null *OMNI-BOEGEN*) (omni:load-data)) + + (setq typ nil) + (setq eintrag nil) + + ;; Zuerst in Boegen suchen + (if artinr + (progn + (setq eintrag (omni:get-bogen (if (/= (atoi artinr) 0) (atoi artinr) artinr))) + (if eintrag (setq typ "bogen")) + ) + ) + + ;; Falls nicht gefunden, in Weichen suchen + (if (and (null eintrag) artinr) + (progn + (setq eintrag (omni:get-weiche (if (/= (atoi artinr) 0) (atoi artinr) artinr))) + (if eintrag (setq typ "weiche")) + ) + ) + + ;; Auch ueber Blockname versuchen (= SivasNr) + (if (null eintrag) + (progn + (setq eintrag (omni:get-bogen (if (/= (atoi bname) 0) (atoi bname) bname))) + (if eintrag (setq typ "bogen")) + ) + ) + (if (null eintrag) + (progn + (setq eintrag (omni:get-weiche (if (/= (atoi bname) 0) (atoi bname) bname))) + (if eintrag (setq typ "weiche")) + ) + ) + + (if (null eintrag) + (progn + (ssg-emsg "Kein Omniflo-Element erkannt! (ARTINR/Blockname nicht im Katalog)") + (ssg-end) + (exit) + ) + ) + + ;; 4. Dialog oeffnen mit vorhandenen Werten + (setq dlg-result nil) + (if (= typ "bogen") + (progn + (setq winkel (cdr (assoc "KurvenWinkel" eintrag))) + (setq dlg-result (omni:bogen-dialog winkel hoehe drehung)) + ) + (progn + (setq winkel (cdr (assoc "KurvenWinkel" eintrag))) + (setq weichentyp (cdr (assoc "WeichenTyp" eintrag))) + (setq dlg-result (omni:weichen-dialog winkel weichentyp hoehe drehung)) + ) + ) + + (if (null dlg-result) + (progn (princ "\nAbgebrochen.") (ssg-end) (exit)) + ) + + ;; 5. Neuen Eintrag und Werte extrahieren + (setq new-eintrag (car dlg-result)) + (setq new-hoehe (cadr dlg-result)) + (setq new-drehung (caddr dlg-result)) + (setq sivasnr-str (omni:sivasid-to-str (omni:val new-eintrag "Sivasnr"))) + + ;; 6. DXF-Datei pruefen + (setq data-pfad (getenv "DXFM_DATA")) + (setq dxf-pfad (strcat data-pfad "/omniflo/" sivasnr-str ".dxf")) + (if (not (findfile dxf-pfad)) + (progn + (ssg-emsg (strcat "DXF nicht gefunden: " dxf-pfad)) + (ssg-end) + (exit) + ) + ) + + ;; 7. Alten Block loeschen und neuen einfuegen + (setvar "ATTREQ" 0) + (setvar "ATTDIA" 0) + (command "_.ERASE" ent "") + + (setq angleDeg (if new-drehung (atof new-drehung) 0.0)) + (command "_.INSERT" dxf-pfad basePoint "" "" angleDeg) + + (setq blockEnt (entlast)) + + ;; Attribute setzen + (if (and blockEnt (= (cdr (assoc 0 (entget blockEnt))) "INSERT")) + (ssg-attrib-set-on blockEnt + (list (cons "HOEHE" (if new-hoehe new-hoehe "2000")) + (cons "DREHUNG" (if new-drehung new-drehung "0")))) + ) + + (princ (strcat "\n[OMNI] Element aktualisiert: " sivasnr-str + " Hoehe=" (if new-hoehe new-hoehe "2000") + " Drehung=" (if new-drehung new-drehung "0"))) + + (ssg-end) + (princ) +) + + ;; --- Omniflo / TEF Elemente --- (defun c:OMNI_TEF_UmlenkR () (princ "\n[DUMMY] Umlenkspannst. rechts fuer TEF links") diff --git a/cfg/attradd.cfg b/cfg/attradd.cfg index ca7c710..6dc1efc 100644 --- a/cfg/attradd.cfg +++ b/cfg/attradd.cfg @@ -25,6 +25,8 @@ LAYER = "A-OF-Bogen" RADIUS = Radius WINKEL = KurvenWinkel SIVASNR_TEF = SivasnrTEF +HOEHE = "2000" +DREHUNG = "0" [weiche] BESCHR = ProfilTyp @@ -34,4 +36,7 @@ LAYER = "A-OF-Weiche" WEICHENTYP = WeichenTyp WINKEL = KurvenWinkel RADIUS = Breite +RICHTUNG = KurvenRichtung SIVASNR_TEF = SivasnrTEF +HOEHE = "2000" +DREHUNG = "0" diff --git a/dcl/omniflo_boegen.dcl b/dcl/omniflo_boegen.dcl index c4830b1..2cec590 100644 --- a/dcl/omniflo_boegen.dcl +++ b/dcl/omniflo_boegen.dcl @@ -50,5 +50,18 @@ omniflo_boegen : dialog { } } + : row { + : edit_box { + key = "val_hoehe"; + label = "Hoehe (mm):"; + edit_width = 10; + } + : edit_box { + key = "val_drehung"; + label = "Drehung (Grad):"; + edit_width = 10; + } + } + ok_cancel; } diff --git a/dcl/omniflo_weichen.dcl b/dcl/omniflo_weichen.dcl index e629c70..86b7e51 100644 --- a/dcl/omniflo_weichen.dcl +++ b/dcl/omniflo_weichen.dcl @@ -61,5 +61,18 @@ omniflo_weichen : dialog { } } + : row { + : edit_box { + key = "val_hoehe"; + label = "Hoehe (mm):"; + edit_width = 10; + } + : edit_box { + key = "val_drehung"; + label = "Drehung (Grad):"; + edit_width = 10; + } + } + ok_cancel; } diff --git a/lib/export_csv.py b/lib/export_csv.py index 65f7b50..2e95926 100644 --- a/lib/export_csv.py +++ b/lib/export_csv.py @@ -57,9 +57,9 @@ def build_bogen_merkmale(block, eintrag): def build_weiche_merkmale(block, eintrag): wt = eintrag.get("WeichenTyp", "Einzelweiche") return { - "Länge in Meter links": None, - "Länge in Meter rechts": None, - "Länge in Meter gerade": None, + "Länge in Meter links": 0, + "Länge in Meter rechts": 0, + "Länge in Meter gerade": 0, "Weichentyp": wt, "Richtung": str(eintrag.get("KurvenRichtung", "")), "Weichenwinkel": eintrag.get("KurvenWinkel", 0), diff --git a/lib/export_sivas.py b/lib/export_sivas.py index e3eaefa..8d5aa7c 100644 --- a/lib/export_sivas.py +++ b/lib/export_sivas.py @@ -76,9 +76,9 @@ def build_weiche_merkmale(block, eintrag): """Merkmale-JSON fuer eine Omniflo Weiche.""" wt = eintrag.get("WeichenTyp", "Einzelweiche") return { - "Länge in Meter links": None, - "Länge in Meter rechts": None, - "Länge in Meter gerade": None, + "Länge in Meter links": 0, + "Länge in Meter rechts": 0, + "Länge in Meter gerade": 0, "Weichentyp": wt, "Richtung": str(eintrag.get("KurvenRichtung", "")), "Weichenwinkel": eintrag.get("KurvenWinkel", 0), diff --git a/menu/SSG_LIB.mnu b/menu/SSG_LIB.mnu index 1a8e159..2da5f58 100644 --- a/menu/SSG_LIB.mnu +++ b/menu/SSG_LIB.mnu @@ -75,7 +75,8 @@ [Antriebst. links fuer TEF links]^C^COMNI_TEF_AntriebL [Antriebst. rechts fuer TEF rechts]^C^COMNI_TEF_AntriebR [<-TEF Gerade]^C^COMNI_TEF_Gerade -[<-KettenFoerderer]^C^COMNI_KettenFoerderer +[KettenFoerderer]^C^COMNI_KettenFoerderer +[<-Element bearbeiten]^C^COMNI_EDIT [->External] [Call Python]^C^CCALLPYTHON [Export Sivas]^C^CEXPORTSIVAS