(in-package :EXAMPLES)
(use-package :OLI)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(sd-defdialog 'Drehent
:dialog-title "Drehent"
:variables
'(
(A_PART :value-type :part-incl-new
:modifies :contents
:title "Teil"
:prompt-text "Name angeben")
(A_ASSEM :value-type :assembly
:modifies :contents
:title "Baugruppe"
:initial-value "/"
:prompt-text "Baugruppe auswaehlen.")
(A_WP :value-type :wp-with-profile
:title "Arbeitsebene"
:prompt-text "Arbeitsebene zum extrudieren auswählen")
(Achse :value-type :measure-direction
:prompt-text "Achse abgeben")
("-")
(KEEP_WP :value-type :boolean
:toggle-type :wide-toggle
:title "Arbeitsebene behalten"
:initial-value t) ;wenn immer keine AE, dann t gegen nil tauschen
(KEEP_PROFILE :value-type :boolean
:toggle-type :wide-toggle
:title "Geometrie behalten"
:initial-value t) ;wenn immer keine AE, dann t gegen nil tauschen
("Werkstoff")
(ABK :value-type :string
:title "Werkstoff"
:show-input-tool (sd-show-display-table "Werkstoff-Dichte-Liste"
:position '("TOP-MENU-TOOLBOX-TB" :lefttop 70 50))
:hide-input-tool (sd-hide-display-table "Werkstoff-Dichte-Liste"
:ignorePin t)
:prompt-text "Werkstoff auswaehlen"
);;ABK
(DICHTE :value-type :positive-number
:title "Dichte"
:prompt-text "Dichte eingeben")
(Farbe2 :value-type :string
:toggle-type :invisible
:after-input (progn (sd-set-variable-status "FARBE"
:value (sd-rgb-to-color (read-from-string Farbe2))) (setq FARBE (sd-rgb-to-color (read-from-string Farbe2)))))
(FARBE :value-type :rgb-color
:title "Farbe")
(Transparenz :expand-shrink (scaled_Trans )
:expand-shrink-toggle-type :boolean)
(scaled_Trans :value-type :scale
:title "Standard - Halbtrans - Volltrans"
:minimum 0
:maximum 2
:initial-value 0
:after-input (progn (setq Trans (/ scaled_Trans 2)))
:initial-enable t)
)
:ok-action '
(sd-call-cmds
(progn
(turn :sel_part A_PART
:wp a_wp
:axis Achse
:rotation_angle (* 2 pi)
:keep_profile (if KEEP_profile :yes :no)
:KEEP_WP (if KEEP_WP :yes :no)
)
(set_part_base_color :parts A_PART :color FARBE)
(set_part_base_density :parts A_PART :dens DICHTE)
(sd-call-cmds (set_part_base_transparency :parts A_PART :transp TRANS) :failure nil)
(CHANGE_PA_OWNER :PARTS_ASSEMBLIES A_PART :NEW_OWNER A_ASSEM)
);progn
);sd-call-cmds
)
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP