#1
|
|||
|
|||
sd-defdialog (:mutual-exclusion)
How I can insert in mine menu one ulterior variable?
This is mine menu: (sd-defdialog 'help1 :dialog-title "help1" :dialog-type :terminate :mutual-exclusion ' (otti not-otti) :variables '( ("HELP") (otti :value-type :grouped-boolean :initial-value T :title "HTML") (not-otti :value-type :grouped-boolean :initial-value NIL :title "DOC") ) : ok-action '(help-1 otti) ) This the one which I would want to obtain Example : (sd-defdialog 'help1 :dialog-title "help1" :dialog-type :terminate :mutual-exclusion ' (otti not-otti ok-otti) :variables '( ("HELP") (otti :value-type :grouped-boolean :initial-value T :title "HTML") (not-otti :value-type :grouped-boolean :initial-value NIL :title "DOC") (ok-otti :value-type :grouped-boolean :initial-value ????????????? :title "TXT") ) : ok-action '(help-1 otti) ) In the field ":initial-value" of my variable new " ok-otti" thing I must insert ?????? Last edited by andrea; 10-28-2004 at 08:15 AM. |
#2
|
|||
|
|||
Hi Andrea,
I think what you're looking for is :initial-value nil. The reason for this is that only one of the elements of the :mutual-exclusion list should be "on" (or t) at any given time. Something else you might consider is using the keyword :third in your variable declarations. This can allow you to have three variables all side-by-side (note that this only works with some variable types). So then your code becomes: Code:
(sd-defdialog 'help1 :dialog-title "help1" :dialog-type :terminate :mutual-exclusion '(otti not-otti ok-otti) :variables '( ("HELP") (otti :value-type :grouped-boolean :size :third :initial-value t :tiitle "HTML") (not-otti :value-type :grouped-boolean :size :third :initial-value nil :title "DOC") (ok-otti :value-type :grouped-boolean :size :third :initial-value nil :title "TXT") ) : ok-action '(help-1 otti) ) I hope this helps! andy
__________________
Andy Poulsen AI MAXTools: Dream. Design. Done. It's that easy! Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+! See them in action at www.ai-maxtools.com and then try them for yourself -- FREE! |
#3
|
|||
|
|||
Not I wanted that only selecting one of the 3 variable ones when then I press on ok, the program help-1 with the selected parameter executes me.
They are explained to me better? You can help me? |
#4
|
|||
|
|||
Hi Andrea,
If you want to have the help-1 function dependent on which options is selected, there are several ways you can do it. One way is to have your :ok-action pass different parameters to the help-1 function (depending on how your help-1 function works). In this case, your :ok-action could look something like this: Code:
:ok-action '(help-1 (cond (otti 0) (not-otti 1) (ok-otti 2))) I hope this helps! Good luck! andy
__________________
Andy Poulsen AI MAXTools: Dream. Design. Done. It's that easy! Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+! See them in action at www.ai-maxtools.com and then try them for yourself -- FREE! |
#5
|
|||
|
|||
THANK'S ......
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|