(in-package :examples) (use-package :oli) ;; Drafting-Macro erstellen (oli::sd-execute-annotator-command :cmd "DEFINE DELETE_ALL_PNT DELETE SELECT GLOBAL ALL EXOR GLOBAL BOX Punkt_1 Punkt_2 CONFIRM END_DEFINE" ) ;;DELETE SELECT GLOBAL ALL EXOR GLOBAL BOX Rechteck_box CONFIRM ;;DELETE GLOBAL ALL CONFIRM ;;DELETE SELECT GLOBAL ALL EXOR GLOBAL BOX 500,-480 1000,-100 CONFIRM ;; Dialog erstellen (sd-defdialog 'Punkte_weg :dialog-title "Punkte löschen" :toolbox-button t :dialog-control :sequential :variables '( (Punkt_1 :value-type :docupntcnp :title "Anfangspkt" :prompt-text "Anfangspunkt anklicken." :after-input (progn (setf Punkt_1 (make-gpnt2d :x (oli::gpntdocu_x Punkt_1) :y (oli::gpntdocu_y Punkt_1))) ) ) (Punkt_2 :value-type :docupntcnp :title "Endpunkt" :prompt-text "Endpunkt anklicken." :after-input (progn (setf Punkt_2 (make-gpnt2d :x (oli::gpntdocu_x Punkt_2) :y (oli::gpntdocu_y Punkt_2))) ) ) ;; (oli::sd-execute-annotator-command :cmd ;; (format nil "DELETE_ALL_PNT ~a,~a ~a,~a" ;; (oli::gpntdocu_x Punkt_1) ;; (oli::gpntdocu_y Punkt_1) ;; (oli::gpntdocu_x Punkt_2) ;; (oli::gpntdocu_y Punkt_2) ;; ) ;; ) ) :ok-action '(progn (setf input (sd-display-question "Alle Punkte löschen ?" :title "Punkte loeschen" :push-1 "loeschen" :push-2 "Abbruch" ) ) (if (eql input :yes) (progn (sd-execute-annotator-command :cmd "DELETE_ALL_PNT") display :show (display "erster Punkt" ) (display Punkt_1) (display "zweiter Punkt" ) (display Punkt_2) ) (progn (cancel_all) ) ) ) )