(in-package :custom) (use-package :OLI) (sd-defdialog 'dc4-anno-bemassen-hline-dialog :dialog-title "Mass-Hilfslinien" ;;:dialog-control :sequential :variables '( (kante :selection *sd-anno-geo-seltype* :prompt-text "Bezugskante angeben" :title "Bezug" :check-function #'(lambda (elem) (let () (if (sd-am-line-struct-p (sd-am-inq-specific-geo-props elem)) :ok (values :error "Nur Linien erlaubt!") );;if );;let );;lambda :after-input (sd-set-variable-status 'richt :enable t) ) (richt :value-type :docupoint :prompt "Seite fuer Bemassung angeben" :title "Richtung" :after-input (after-richt-action) :initial-enable nil ) ) :local-functions '( (after-richt-action () (let (ap ep mp rp) (setf ap (sd-am-line-struct-start-pnt (sd-am-inq-specific-geo-props kante))) (setf ep (sd-am-line-struct-end-pnt (sd-am-inq-specific-geo-props kante))) (setf mp (sd-vec-add ap (sd-vec-scale (sd-vec-subtract ep ap) .5))) (setf rp (format nil "~a,~a" (gpnt2d_x richt) (gpnt2d_y richt))) (sd-execute-annotator-command :cmd (format nil "C_LINE PARALLEL 10 18 26 34 42 50 58 ~a ~a END" mp rp)) (sd-set-variable-status 'richt :enable nil) (setf richt nil) (setf kante nil) );;let ) ) :ok-action '() )