;;--------------------------------------------------------------------------* ;; Copyright 2003 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: am_mirror.lsp ;; Version : 1.0 ;; Datum : 21.08.2003 ;; Author : Gt (in-package :custom) (use-package :OLI) (sd-defdialog 'dc4-anno-ansicht-spiegeln-dialog :dialog-title "Ansicht spiegeln" :variables '( (ans :selection *sd-anno-view-seltype* :prompt-text "Ansicht zum Spiegeln angeben." :title "Ansicht" :multiple-items nil :check-function #'(lambda (para) (if nil :ok :err)) :confirmation (:Err :dialog :warning :prompt (format nil "~a~%~a" "Durch das Spiegeln koennen Bemassungen beschaedigt werden," "besonders nach erneutem Aktualisieren!") :severity :high :cancel-cleanup (cancel) ) ) (m2p :value-type :grouped-boolean :title "2 P." :size :third :initial-value t :after-input (after-m2p-action) ) (mh :value-type :grouped-boolean :title "waagr." :size :third :after-input (after-mhv-action) ) (mv :value-type :grouped-boolean :title "senkr." :size :third :after-input (after-mhv-action) ) (pnt1 :value-type :docupntcnp :prompt-text "Erster Punkt fuer Spiegelachse angeben" :title "Punkt 1" :after-input (when m2p (sd-execute-annotator-command :cmd (format nil "LEADER_LINE ~A,~A" (oli::gpntdocu_x pnt1) (oli::gpntdocu_y pnt1)))) ) (pnt2 :value-type :docupntcnp :prompt-text "Zweiter Punkt fuer Spiegelachse angeben" :title "Punkt 2" :initial-enable t :after-input (progn (sd-execute-annotator-command :cmd (format nil "CANCEL")) );;progn ) ) :mutual-exclusion '((m2p mh mv)) :local-functions '( (after-m2p-action () (sd-set-variable-status 'pnt2 :enable t) ) (after-mhv-action () (sd-set-variable-status 'pnt2 :enable nil) ) (next-action () (let (uname mep1 mep2 comstring) (setf uname (sd-am-inq-unique-name ans)) (setf mep1 (format nil "~a,~a" (oli::gpntdocu_x pnt1) (oli::gpntdocu_y pnt1))) (cond (mv (setf mep2 (format nil "~a,~a" (oli::gpntdocu_x pnt1) (+ 1 (oli::gpntdocu_y pnt1))))) (mh (setf mep2 (format nil "~a,~a" (+ 1 (oli::gpntdocu_x pnt1)) (oli::gpntdocu_y pnt1)))) (m2p (setf mep2 (format nil "~a,~a" (oli::gpntdocu_x pnt2) (oli::gpntdocu_y pnt2)))) );;cond (setf comstring (format nil "~a '~a'~%~a~%~a ~a ~a '~a' ~a~%~a" "EDIT_PART" uname "END_PART" "MODIFY MIRROR DEL_OLD KEEP_READABLE TWO_PTS" mep1 mep2 uname "END" "EDIT_PART TOP" )) ;;(display comstring) (sd-execute-annotator-command :cmd comstring) ) ) (clean-action () (let () (sd-execute-annotator-command :cmd "CANCEL") ) ) ) :cancel-action '(clean-action) :ok-action '(progn (clean-action) (next-action)) )