Archiman86 Posted February 2, 2009 Posted February 2, 2009 Ok, I am trying to set this dialog box up so that under certain circumstances in the drawing file, it de-activates certain options. I have it set up like this in the AuotLisp routine: (setq dlg-id (load_dialog "path to file")) (new_dialog "BGEplt" dlg-id) (if(= numThree 20) ((set_tile "dev1" 1) (mode_tile "dev2" 1) (mode_tile "dev3" 1) (action_tile "pOne" "(setq Plot1 $value)") (mode_tile "pTwo" 1) (mode_tile "pThree" 1) (mode_tile "pFour" 1) (mode_tile "pFive" 1) ) ) (if (= numThree 40) ((action_tile "dev1" "(setq device1 $value)") (action_tile "dev2" "(setq device2 $value)") (action_tile "dev3" "(setq device3 $value)") (mode_tile "pOne" 1) (action_tile "pTwo" "(setq Plot2 $value)") (action_tile "pThree" "(setq Plot3 $value)") (action_tile "pFour" "(setq Plot4 $value)") (mode_tile "pFive" 1) ) ) (if (= numThree 60) ((mode_tile "dev1" 1) (action_tile "dev2" "(setq device2 $value)") (action_tile "dev3" "(setq device3 $value)") (mode_tile "pOne" 1) (action_tile "pTwo" "(setq Plot2 $value)") (action_tile "pThree" "(setq Plot3 $value)") (action_tile "pFour" "(setq Plot4 $value)") (action_tile "pFive" "(setq Plot5 $value)") ) ) (start_dialog) (unload_dialog dlg-id) I am trying to figure out why this does not work. The variable "numThree" is based on an attribute found in the drawing prior to loading the dialog box. I am trying to make it so that if the drawing file is size "A" then de-activate all options that are not related, and so forth. When I run it in autocad it goes through and de-activates the proper options, but then when it goes back to the top to the "action_tile" functions i get this error: ; error: bad function: T I am sure it is jsut a small thing I am missing, hopefully, but I cant figure it out. Any help would be greatly appreciated. Thank you in advance, Quote
TimSpangler Posted February 2, 2009 Posted February 2, 2009 for starters I think you want (cond not (if. If you do want if then you'll need a (progn after HTH Quote
Archiman86 Posted February 2, 2009 Author Posted February 2, 2009 Thanks, that helped out. - but now i have another question. It seems that when I click one radio button, but then change my mind and click another one in the same cluster, that it only stores the first selection to the value, as opposed to the last one. is this true? for instance, I select one plotter, but then change my mind to another one, it still sends the plot to the first one. Quote
CAB Posted February 2, 2009 Posted February 2, 2009 I would set the actions like this: (action_tile "dev1" "(setq device# 1)") (action_tile "dev2" "(setq device# 2)") (action_tile "dev3" "(setq device# 3)") (action_tile "pOne" "(setq Plot# 1)") (action_tile "pTwo" "(setq Plot# 2)") (action_tile "pThree" "(setq Plot# 3)") (action_tile "pFour" "(setq Plot# 4)") Then test the variable to see which buttons were puched. Be sure to set a default in case no button uas pushed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.