(in-package :custom) (use-package :oli) (sd-defdialog 'iwg-2dgeo-vervielfaeltigen-dialog :toolbox-button t :dialog-title "2D Geo mehrfach bewegen" ;;:dialog-control :sequential :precondition '(if (sd-inq-curr-wp-exists-p) :ok (values :error "Keine aktive Arbeitsebene verfuegbar!")) :variables '( ;;local (back-states :initial-value nil) ;;dialog (qgeo :selection (*sd-edge-2d-seltype*) :multiple-items t :show-select-menu t :prompt-text "Quellgeometrie angeben" :title "Quelle" ;;:initial-value nil :next-variable (if (not startp) 'startp 'zielp) ) (startp :value-type :point-2d :title "Startpunkt" :prompt-text "Startpunkt fuer Vervielfaeltigung angeben" :next-variable (if (not qgeo) 'qgeo 'zielp) ) (zielp :value-type :point-2d :multiple-items t :show-select-menu t :prompt-text "Zielpunkt angeben" :title "Zielpunkt" ;;:initial-value nil :next-variable (if (not qgeo) 'qgeo (if (not startp) 'startp 'zielp)) :after-input (next-action) ) (back :title "Zurueck" :push-action (back-action) ) ) :local-functions '( (next-action () (let (et) (if (and qgeo startp) (progn ;; remember current model state: (push (sd-set-model-checkpoint) back-states) (dolist (et qgeo) (sd-call-cmds (move_2d :select et :direction startp zielp :keep :on) ) );;dolist (setf zielp nil) (when back-states (sd-set-variable-status 'back :enable t)) );;progn (progn (sd-display-error "Zielpunkt zuletzt angeben!") (setf zielp nil) );;progn );;if );;let ) (back-action () (let () (when back-states (progn (sd-return-to-model-checkpoint (pop back-states)) (unless back-states (sd-set-variable-status 'back :enable nil)) );;progn );;when );;let ) ) :ok-action '() :help-action '() )