Jump to content

How to pull info from a list box and radio buttons


Recommended Posts

Posted

I have a list box that will contain the leg sizes for different angles, then I have radio buttons that I want to choose the thickness from. I want to know how I can pull the leg size with the thickness, get the weight per foot for that angle size (have that info), then I think I can put the rest together. I don't need the code wrote out for me. I just want to know how to do it. I have check tutorials and they show you how to use them separate, but I want to combine after they are selected. This is what I have created so far:

 

DCL:

Angle : dialog {
label = "Angle";
 : text {
key = "t1";
value="Please select your angle information";
}
: text {
key = "t2";
value="and enter your length.";
}
 : row {
 : boxed_column {
 label = "Select angle leg size:";
 : list_box {
 key = "legs";
 height = 15;
 width = 17;
 multiple_select = false;
 fixed_width_font = true;
 value = "";
 }}
 : column {
 : boxed_column {
 label = "Select thickness:";
 : radio_button {
 key = "1/8";
 label = "1/8";
 }
 : radio_button {
 key = "3/16";
 label = "3/16";
 }
 : radio_button {
 key = "1/4";
 label = "1/4";
 }
 : radio_button {
 key = "5/16";
 label = "5/16";
 }
 : radio_button {
 key = "3/8";
 label = "3/8";
 }
 : radio_button {
 key = "7/16";
 label = "7/16";
 }
 : radio_button {
 key = "1/2";
 label = "1/2";
 }
 : radio_button {
 key = "9/16";
 label = "9/16";
 }
 : radio_button {
 key = "5/8";
 label = "5/8";
 }
 : radio_button {
 key = "3/4";
 label = "3/4";
 }
 : radio_button {
 key = "7/8";
 label = "7/8";
 }
 : radio_button {
 key = "1";
 label = "1";
 }
 : radio_button {
 key = "1 1/8";
 label = "1 1/8";
 }
 }
 : boxed_column {
 : toggle {
 key = "galv";
 label = "Galvanized";
 value = "0";
 }
 }}}
 : boxed_row {
 label = "Enter angle length:";
 : edit_box {
 key="ft";
 label = "Feet:";
 edit_width=6;
 }
 : edit_box {
 key="in";
 label = "Inches:";
 edit_width=6;
 }
 }
 ok_cancel;
 }

LSP:

(prompt "\nType ANG to run.....")

(defun C:ANG ()
 (setq    legs (list "1 x 1"   "1 1/8 x 1 1/8" "1 1/4 x 1 1/4"
          "1 1/2 x 1 1/2"  "1 3/4 x 1 3/4" "2 x 2" 
          "2 1/2 x 2"  "2 1/2 x 2 1/2" "3 x 2" 
          "3 x 2 1/2"  "3 x 3" "3 1/2 x 2 1/2" 
          "3 1/2 x 3"  "3 1/2 x 3 1/2" "4 x 3" 
          )
 )
 (setq dcl_id (load_dialog "Angle.dcl"))

 (if (not (new_dialog "Angle" dcl_id))
   (exit)
 )                    
 (start_list "legs" 3)
 (mapcar 'add_list legs)
 (end_list)
 (action_tile
   "accept"
   "(done_dialog)"
 )                    

 (start_dialog)
 (unload_dialog dcl_id)

 (princ)

)                    
(princ)
    

They will be more angle sizes added to this, just want know how to put everything together first. Any help would be greatly appreciated.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...