Etagenförderer auch editierbar gemacht.
This commit is contained in:
1 parent
2e49d0b522
commit
7f42ac2701
5 files changed
+205
-16
No files matched your search
@@ -825,6 +825,174 @@
|
||||
endpunkt
|
||||
)
|
||||
|
||||
;; ============================================================
|
||||
;; TEIL 7: DCL-DIALOG (Neuanlage + Edit)
|
||||
;; ============================================================
|
||||
;; Der Etage-Typ nutzt dieselben Dialoge wie der Standard-Typ
|
||||
;; (vfs-dialog-eingabe-basis / vfs-dialog-winkel-verteilung in vf_standard.lsp).
|
||||
;; Unterschiede zum Standard-Ablauf: Berechnung ueber berechne-etage (braucht
|
||||
;; seite), Einfuegung ueber etage-foerderanlage-einfuegen, KEINE horizontale
|
||||
;; Zwischenstrecke (Winkel-Sentinel 0). XDATA-Marker "etage".
|
||||
|
||||
;; Gemeinsame Berechnung + Winkel/Verteilung-Dialog + Einfuegung.
|
||||
;; Wird von der Neuanlage (vfe-etage-dialog-ablauf) und vom Edit (vfe-edit-ent)
|
||||
;; genutzt. winkel-prefill: Vorbelegung fuer vfs-dialog-winkel-verteilung oder nil.
|
||||
;; Analog vfs-standard-dialog-berechnen-einfuegen in vf_standard.lsp.
|
||||
(defun vfe-etage-dialog-berechnen-einfuegen (vf-nummer deltaL deltaH richtung startpunkt hz seite
|
||||
winkel-prefill geruest-einzelmodul geruest-typ /
|
||||
ergebnis ergebnis-liste gueltige-winkel
|
||||
winkelwahl best-winkel L_GF L_VF L_GF1 L_GF2 verteilung-modus
|
||||
n-scanner hoehe-von hoehe-bis lastEnt vf-insert vf-endpunkt
|
||||
staustrecke-basis)
|
||||
(setq ergebnis (berechne-etage deltaL deltaH richtung seite))
|
||||
(setq ergebnis-liste (cadddr ergebnis))
|
||||
(setq staustrecke-basis (ssg-cfg-or "vario" "staustrecke_basis" 1000))
|
||||
|
||||
(setq gueltige-winkel
|
||||
(mapcar 'car
|
||||
(vl-remove-if-not
|
||||
(function (lambda (e) (and (nth 3 e) (numberp (nth 1 e)) (numberp (nth 2 e))
|
||||
(>= (nth 1 e) 0) (>= (nth 2 e) 0))))
|
||||
ergebnis-liste)))
|
||||
|
||||
(if (null gueltige-winkel)
|
||||
(alert (ssg-textf "vfc-alert-kein-winkel"
|
||||
(list (chr 916) (rtos deltaL 2 0) (rtos deltaH 2 0) richtung)))
|
||||
(progn
|
||||
(setq winkelwahl (vfs-dialog-winkel-verteilung gueltige-winkel ergebnis-liste staustrecke-basis winkel-prefill))
|
||||
(if (null winkelwahl)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq best-winkel (nth 0 winkelwahl)
|
||||
L_GF (nth 1 winkelwahl)
|
||||
L_VF (nth 2 winkelwahl)
|
||||
L_GF1 (nth 3 winkelwahl)
|
||||
L_GF2 (nth 4 winkelwahl)
|
||||
verteilung-modus (nth 5 winkelwahl))
|
||||
(setq n-scanner 0)
|
||||
(setq hoehe-von (caddr startpunkt))
|
||||
(setq hoehe-bis
|
||||
(cond ((= richtung "Auf") (+ hoehe-von deltaH))
|
||||
((= richtung "Ab") (- hoehe-von deltaH))
|
||||
(t hoehe-von)))
|
||||
(setq lastEnt (vf-lastent-ohne-attribute))
|
||||
(setq vf-endpunkt
|
||||
(etage-foerderanlage-einfuegen deltaL deltaH richtung best-winkel L_GF1 L_GF2 L_VF startpunkt seite hz))
|
||||
(setq vf-insert
|
||||
(vf-block-erstellen "etage" seite vf-nummer n-scanner
|
||||
hoehe-von hoehe-bis deltaH deltaL L_VF L_GF1 L_GF2
|
||||
richtung best-winkel startpunkt lastEnt hz
|
||||
geruest-einzelmodul geruest-typ))
|
||||
(if vf-insert (vf-edit-xdata-schreiben vf-insert "etage" hz))
|
||||
(princ "\n=========================================")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(list vf-insert vf-endpunkt)
|
||||
)
|
||||
|
||||
;; Neuanlage (Menue/Konsole -> Dialog): Startpunkt (X/Y) picken, Basis-Dialog,
|
||||
;; dann gemeinsame Berechnung/Winkel-Dialog/Einfuegung.
|
||||
;; Analog vfs-standard-dialog-ablauf in vf_standard.lsp.
|
||||
(defun vfe-etage-dialog-ablauf (vf-nummer / eingabe deltaL deltaH richtung
|
||||
z-start hz seite startpunkt startpunkt-xy dim
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq startpunkt-xy (getpoint (ssg-text "vfc-prompt-startpunkt-aus")))
|
||||
(if (null startpunkt-xy) (setq startpunkt-xy '(0 0 0)))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis nil))
|
||||
(if (null eingabe)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq deltaL (nth 0 eingabe)
|
||||
deltaH (nth 1 eingabe)
|
||||
richtung (nth 2 eingabe)
|
||||
z-start (nth 3 eingabe)
|
||||
hz (nth 4 eingabe)
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt-xy) (cadr startpunkt-xy) z-start))
|
||||
;; Gewaehlte Dimension (2D/3D) + Motorseite fuer den Bau erzwingen, danach zurueck.
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(vfe-etage-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung startpunkt hz seite nil
|
||||
geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; Edit eines bestehenden Etage-VF-Blocks (VF_n mit SSG_VF_EDIT-XDATA "etage").
|
||||
;; Wird von c:VARIOFOERDERER_EDIT (vf_standard.lsp) per Typ-Dispatch gerufen und
|
||||
;; laeuft innerhalb der dort geoeffneten ssg-start-Sitzung. Liest Parameter aus
|
||||
;; XDATA/Attributen, zeigt sie vorbelegt und baut bei OK am selben Startpunkt neu
|
||||
;; auf. Analog dem Standard-Edit-Body in c:VARIOFOERDERER_EDIT.
|
||||
(defun vfe-edit-ent (ent / ed bname startpunkt attribs xd
|
||||
deltaL deltaH richtung z-start hz seite dim
|
||||
eingabe vf-nummer best-winkel-attr L_GF_m-teile
|
||||
prefill-basis prefill-winkel
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq ed (entget ent))
|
||||
(setq bname (cdr (assoc 2 ed)))
|
||||
(setq xd (vfs-xdata-lesen ent))
|
||||
(setq startpunkt (cdr (assoc 10 ed)))
|
||||
(setq attribs (ssg-attrib-read ent))
|
||||
(setq hz (atof (nth 1 xd)))
|
||||
(setq deltaL (atof (cond ((cdr (assoc "DELTA_L_mm" attribs))) ("15000"))))
|
||||
(setq deltaH (atof (cond ((cdr (assoc "DELTA_H_mm" attribs))) ("0"))))
|
||||
(setq richtung (cond ((cdr (assoc "ANTRIEBFAHRTRICHTUNG" attribs))) ("Auf")))
|
||||
(setq seite (cond ((cdr (assoc "SEITE_AS" attribs))) ("links")))
|
||||
(setq z-start (caddr startpunkt))
|
||||
|
||||
(setq prefill-basis
|
||||
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
|
||||
(cons "einfuegehoehe" z-start) (cons "hz" hz) (cons "seite" seite)
|
||||
(cons "dim" (cond ((ssg-dim-xdata-lesen ent)) ("3D")))
|
||||
(cons "geruest-einzelmodul" (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("1")))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
(cons "motorseite" (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis prefill-basis))
|
||||
(if (null eingabe)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq deltaL (nth 0 eingabe)
|
||||
deltaH (nth 1 eingabe)
|
||||
richtung (nth 2 eingabe)
|
||||
z-start (nth 3 eingabe)
|
||||
hz (nth 4 eingabe)
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt) (cadr startpunkt) z-start))
|
||||
|
||||
(setq best-winkel-attr (atoi (cond ((cdr (assoc "VF_WINKEL" attribs))) ("0"))))
|
||||
(setq L_GF_m-teile (ssg-cfg-split-comma (cond ((cdr (assoc "L_GF_m" attribs))) ("0.0,0.0"))))
|
||||
(setq prefill-winkel
|
||||
(list (cons "winkel" best-winkel-attr)
|
||||
(cons "verteilung-idx" "3")
|
||||
(cons "lgf1" (* 1000.0 (atof (car L_GF_m-teile))))))
|
||||
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(entdel ent)
|
||||
(setq vf-nummer (vf-next-number))
|
||||
(vfe-etage-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung
|
||||
startpunkt hz seite prefill-winkel geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
(princ (ssg-textf "vfs-edit-neu-aufgebaut" (list bname)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ============================================================
|
||||
;; REGISTRIERUNG
|
||||
;; ============================================================
|
||||
|
||||
Reference in new issue
Block a user