;;------------------------------------------------------------------------------------- ;; gdm_anno_dim_copy.lsp ;; os / 30.01.2018 ;; die gewwählte Bemassung wird ausgelesen und je nach Auswahl in den Prefix oder Postfix geschrieben. ;; Der Text im Postfix und Prefix wird durchgestrichen dargestell . (durch den Schriftfont hp_i3098_c_durchgestrichen ) ;; Bestehende Texte im Prefix und Postfix werden überschrieben ;;------------------------------------------------------------------------------------- (in-package :GDM) (use-package :OLI) (sd-defdialog 'gdm-dim-copy-dialog :dialog-title (sd-multi-lang-string "DIM Copy" :german "Bem Kopie") :toolbox-button t :variables '( (DIM_INDEX :title (sd-multi-lang-string "Index" :german "Index") :value-type :positive-number :initial-value 1) (DIM_SEL :selection (*sd-anno-dimension-seltype*) :title (sd-multi-lang-string "Dimension" :german "Bemassung") :toggle-type :invisible :prompt-text (sd-multi-lang-string "Pick Dimension." :german "Wähle Bemassung.") :after-input (os-am-dim-copy) :next-variable 'DIM_SEL) (TEXT_PREFIX :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "Dim to Prefix" :german "Bem. nach Prefix") :initial-value t) (TEXT_POSTFIX :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "Dim to Postfix" :german "Bem. nach Postfix") :initial-value nil) );;variables :mutual-exclusion '(TEXT_PREFIX TEXT_POSTFIX) :local-functions '( (os-am-dim-copy () (let (DIM_OLD INDEX) ;; set index to superfix (setf INDEX (format nil "(~a)" DIM_INDEX)) (if TEXT_POSTFIX (progn ;; copy Bem. to postfix (setf DIM_OLD (format nil " ~a" (sd-am-inq-dim-main-value-text DIM_SEL))) (sd-call-cmds (AM_DIM_PROPS :dim_list DIM_SEL :dim_postfix DIM_OLD :page :text_props :TEXT_SCOPE :POSTFIX :line_color_setting :off :TEXT_COLOR 65280 :done :TEXT_REL_SIZE 1 :TEXT_FONT_1B "hp_i3098_c_durchgestrichen")) (sd-call-cmds (AM_DIM_PROPS :dim_list DIM_SEL :dim_prefix INDEX :page :text_props :TEXT_SCOPE :PREFIX :line_color_setting :off :TEXT_COLOR 65280 :done :TEXT_REL_SIZE 0.7)) ) (progn ;; copy Bem. to prefix (setf DIM_OLD (format nil "~a " (sd-am-inq-dim-main-value-text DIM_SEL))) (sd-call-cmds (AM_DIM_PROPS :dim_list DIM_SEL :dim_prefix DIM_OLD :page :text_props :TEXT_SCOPE :PREFIX :line_color_setting :off :TEXT_COLOR 65280 :done :TEXT_REL_SIZE 1 :TEXT_FONT_1B "hp_i3098_c_durchgestrichen")) (sd-call-cmds (AM_DIM_PROPS :dim_list DIM_SEL :dim_postfix INDEX :page :text_props :TEXT_SCOPE :POSTFIX :line_color_setting :off :TEXT_COLOR 65280 :done :TEXT_REL_SIZE 0.7)) ) ) ) ) ) :prompt-variable 'DIM_SEL :ok-action '(cancel) );; sd-defdialog