Omniflo Dialoge mit dcl Datei erzeugt

This commit is contained in:
2026-05-08 13:16:09 +02:00
parent cc229617a5
commit 2c4b708233
4 changed files with 209 additions and 30 deletions
+135 -11
View File
@@ -408,32 +408,156 @@
;; ============================================================
;; OMNIFLO MODUL-BEFEHLE (Dummy-Implementierungen)
;; OMNIFLO BOGEN-DIALOG
;; Generischer Dialog fuer Bogen-Auswahl nach Winkel
;; ============================================================
;; --- Detail-Felder im Dialog aktualisieren ---
;; Wird bei Dropdown-Aenderung aufgerufen (action_tile callback)
(defun omni:bogen-dlg-update (idx-str / idx eintrag wkl)
(setq idx (atoi idx-str))
(setq eintrag (nth idx *OMNI-DLG-BOEGEN*))
(if eintrag
(progn
(set_tile "val_sivasnr"
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")))
(setq wkl (omni:val eintrag "KurvenWinkel"))
(set_tile "val_winkel"
(if (= (type wkl) 'INT) (strcat (itoa wkl) " Grad")
(strcat (rtos wkl 2 1) " Grad")
)
)
(set_tile "val_radius"
(itoa (fix (omni:val eintrag "Radius"))))
(set_tile "val_breite"
(itoa (fix (omni:val eintrag "Breite"))))
(set_tile "val_laenge"
(itoa (fix (omni:val eintrag "Länge"))))
)
)
)
;; --- 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)
(if (null *OMNI-BOEGEN*) (omni:load-data))
;; Boegen nach Winkel filtern
(setq boegen-liste (omni:filter *OMNI-BOEGEN* "KurvenWinkel" winkel))
(if (null boegen-liste)
(progn
(alert (strcat "Keine Boegen fuer "
(if (= (type winkel) 'INT) (itoa winkel) (rtos winkel 2 1))
" Grad gefunden."))
nil
)
(progn
;; In globaler Variable fuer Dialog-Callbacks speichern
(setq *OMNI-DLG-BOEGEN* boegen-liste)
;; ProfilTyp-Liste fuer Dropdown aufbauen
(setq profil-liste
(mapcar '(lambda (e) (cdr (assoc "ProfilTyp" e))) boegen-liste))
;; DCL laden
(setq dcl-pfad (strcat (getenv "DXFM_DCL") "/omniflo_boegen.dcl"))
(setq dat (load_dialog dcl-pfad))
(if (not (new_dialog "omniflo_boegen" dat))
(progn (alert "Bogen-Dialog konnte nicht geladen werden.") nil)
(progn
;; Dropdown befuellen
(start_list "bogenart")
(mapcar 'add_list profil-liste)
(end_list)
(set_tile "bogenart" "0")
;; Startwerte anzeigen
(omni:bogen-dlg-update "0")
;; Callback bei Dropdown-Aenderung
(action_tile "bogenart" "(omni:bogen-dlg-update $value)")
;; OK/Abbrechen
(action_tile "accept"
"(setq ergebnis (atoi (get_tile \"bogenart\"))) (done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(start_dialog)
(unload_dialog dat)
;; Gewaehlten Eintrag zurueckgeben
(if ergebnis
(nth ergebnis *OMNI-DLG-BOEGEN*)
nil
)
)
)
)
)
)
;; ============================================================
;; OMNIFLO MODUL-BEFEHLE
;; ============================================================
;; --- Omniflo / Boegen ---
(defun c:OMNI_APB_630_90 ()
(princ "\n[DUMMY] APB 110 R 630/90 800/800 (821104033)")
(defun c:OMNI_APB_630_90 ( / eintrag)
(setq eintrag (omni:bogen-dialog 90))
(if eintrag
(princ (strcat "\n[BOGEN] Gewaehlt: "
(omni:val eintrag "ProfilTyp") " (SivasNr: "
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")) ")"))
(princ "\n[BOGEN] Abgebrochen.")
)
(princ)
)
(defun c:OMNI_APB_550_675 ()
(princ "\n[DUMMY] APB 110 R 550/67.5 432 (821104027)")
(defun c:OMNI_APB_550_675 ( / eintrag)
(setq eintrag (omni:bogen-dialog 67.5))
(if eintrag
(princ (strcat "\n[BOGEN] Gewaehlt: "
(omni:val eintrag "ProfilTyp") " (SivasNr: "
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")) ")"))
(princ "\n[BOGEN] Abgebrochen.")
)
(princ)
)
(defun c:OMNI_APB_630_45 ()
(princ "\n[DUMMY] APB 110 R 630/45 400 (821104031)")
(defun c:OMNI_APB_630_45 ( / eintrag)
(setq eintrag (omni:bogen-dialog 45))
(if eintrag
(princ (strcat "\n[BOGEN] Gewaehlt: "
(omni:val eintrag "ProfilTyp") " (SivasNr: "
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")) ")"))
(princ "\n[BOGEN] Abgebrochen.")
)
(princ)
)
(defun c:OMNI_APB_550_225 ()
(princ "\n[DUMMY] APB 110 R 550/22.5 84 (821104025)")
(defun c:OMNI_APB_550_225 ( / eintrag)
(setq eintrag (omni:bogen-dialog 22.5))
(if eintrag
(princ (strcat "\n[BOGEN] Gewaehlt: "
(omni:val eintrag "ProfilTyp") " (SivasNr: "
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")) ")"))
(princ "\n[BOGEN] Abgebrochen.")
)
(princ)
)
(defun c:OMNI_APB_650_180 ()
(princ "\n[DUMMY] APB 110 R 650/180 L=150 (821104043)")
(defun c:OMNI_APB_650_180 ( / eintrag)
(setq eintrag (omni:bogen-dialog 180))
(if eintrag
(princ (strcat "\n[BOGEN] Gewaehlt: "
(omni:val eintrag "ProfilTyp") " (SivasNr: "
(omni:sivasid-to-str (omni:val eintrag "Sivasnr")) ")"))
(princ "\n[BOGEN] Abgebrochen.")
)
(princ)
)
+1
View File
@@ -19,6 +19,7 @@ set "DXFM_CFG=%DXFMAKRO%\cfg"
set "DXFM_LOG=%DXFMAKRO%\log"
set "DXFM_BLOCKS=%DXFMAKRO%\Blocks"
set "DXFM_LISP=%DXFMAKRO%\Lisp"
set "DXFM_DCL=%DXFMAKRO%\dcl"
set "DXFM_RESULTS=%DXFMAKRO%\results"
set BRISCAD="C:\Program Files\Bricsys\BricsCAD V25 de_DE\bricscad.exe"
+54
View File
@@ -0,0 +1,54 @@
// ============================================================
// omniflo_boegen.dcl - Bogen-Auswahl Dialog fuer Omniflo
// Zeigt gefilterte Boegen nach Winkel mit Details an.
// ============================================================
omniflo_boegen : dialog {
label = "Omniflo Bogen Auswahl";
: row {
: popup_list {
key = "bogenart";
label = "Bogenart:";
width = 42;
}
: edit_box {
key = "val_sivasnr";
label = "SivasNr:";
width = 22;
is_enabled = false;
}
}
: row {
: edit_box {
key = "val_winkel";
label = "Winkel:";
width = 16;
is_enabled = false;
}
: edit_box {
key = "val_radius";
label = "Radius:";
width = 16;
is_enabled = false;
}
}
: row {
: edit_box {
key = "val_breite";
label = "Breite:";
width = 16;
is_enabled = false;
}
: edit_box {
key = "val_laenge";
label = "Laenge:";
width = 16;
is_enabled = false;
}
}
ok_cancel;
}
+19 -19
View File
@@ -39,32 +39,32 @@
[<-ILS Schliessen]^C^C
[->Omniflo]
[->Boegen]
[APB 110 R 630/90 800/800 (821104033)]^C^COMNI_APB_630_90
[APB 110 R 550/67.5 432 (821104027)]^C^COMNI_APB_550_675
[APB 110 R 630/45 400 (821104031)]^C^COMNI_APB_630_45
[APB 110 R 550/22.5 84 (821104025)]^C^COMNI_APB_550_225
[<-APB 110 R 650/180 L=150 (821104043)]^C^COMNI_APB_650_180
[90]^C^COMNI_APB_630_90
[67.5]^C^COMNI_APB_550_675
[45]^C^COMNI_APB_630_45
[22.5]^C^COMNI_APB_550_225
[<-180 ]^C^COMNI_APB_650_180
[->Aluprofil Gerade]
[<-AP 110]^C^COMNI_AP110
[->Weiche 90 Grad]
[Einfach 90 700/700 links M (834372027)]^C^COMNI_W90_Einfach
[Doppel 90 700/700 M (834372109)]^C^COMNI_W90_Doppel
[<-Dreiwege 90 700/700 M (834372209)]^C^COMNI_W90_Dreiwege
[Einfach 90 700/700 links M]^C^COMNI_W90_Einfach
[Doppel 90 700/700 M]^C^COMNI_W90_Doppel
[<-Dreiwege 90 700/700 M]^C^COMNI_W90_Dreiwege
[->Weiche 45 Grad]
[Einfach 45 350/700 links M (834372001)]^C^COMNI_W45_Einfach
[Doppel 45 350/700 M (834372100)]^C^COMNI_W45_Doppel
[<-Dreiwege 45 350/700 M (834372200)]^C^COMNI_W45_Dreiwege
[Einfach 45 350/700 links M]^C^COMNI_W45_Einfach
[Doppel 45 350/700 M]^C^COMNI_W45_Doppel
[<-Dreiwege 45 350/700 M]^C^COMNI_W45_Dreiwege
[->Weichen Parallel]
[Einfach Parallel 200/750 links M (834372047)]^C^COMNI_WP_Einfach
[Doppel Parallel 200/750 M (834372115)]^C^COMNI_WP_Doppel
[<-Dreiwege Parallel 200/750 M (834372215)]^C^COMNI_WP_Dreiwege
[Einfach Parallel 200/750 links M]^C^COMNI_WP_Einfach
[Doppel Parallel 200/750 M]^C^COMNI_WP_Doppel
[<-Dreiwege Parallel 200/750 M]^C^COMNI_WP_Dreiwege
[->Weichenkoerper]
[Weichenkoerper Einfach 22.5 links M (834342011)]^C^COMNI_WK_Einfach
[Weichenkoerper Doppel 22.5 M (834342100)]^C^COMNI_WK_Doppel
[<-Weichenkoerper Dreiwege 22.5 M (834342200)]^C^COMNI_WK_Dreiwege
[Weichenkoerper Einfach 22.5 links M]^C^COMNI_WK_Einfach
[Weichenkoerper Doppel 22.5 M]^C^COMNI_WK_Doppel
[<-Weichenkoerper Dreiwege 22.5 M]^C^COMNI_WK_Dreiwege
[->Weichenkombinationen]
[Delta 1400/700 M (834372400)]^C^COMNI_WKomb_Delta
[<-Star 1400/1400 M (834372420)]^C^COMNI_WKomb_Star
[Delta 1400/700 M]^C^COMNI_WKomb_Delta
[<-Star 1400/1400 M]^C^COMNI_WKomb_Star
[->TEF Elemente]
[Umlenkspannst. rechts fuer TEF links]^C^COMNI_TEF_UmlenkR
[Umlenkspannst. links fuer TEF rechts]^C^COMNI_TEF_UmlenkL