- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all. I am working on developing a dialog menu to fill in a table for me using check boxes. The objective for each check box is if set to true it will add a Wingding 0xFC ascii code. I have been able to fully flesh out the the dialog box. Being that I am still a novice I am having some trouble with understanding how to approach filling in this table. I am in need of some guidance.
I know that I will need to add in an if statement to each action tile that will either add in the wingding check to a specific cell location for each checkbox. So far I am still reading up on how to do that through several forum discussions and tutorials.
MY first question is do I need to select the existing table before executing the dialog to associate to the table I need filled in?
Second question is if it is possible to access the table without needing to select it first? I am hoping to tie this into other tables i.e. a responsibility matrix table for the contractor.
This is new grounds for me currently with only limited experience in making simple routines before. Want to try to start developing more complex functions that do more of the repetitive work or improve consistency for me.
Dialog:
Opt_Menu : dialog { //dialog name
label = "Options List" ; //pop-up window title
:boxed_radio_column {
label = "Interior Options" ;
: row {
: toggle {key = "t1" ; label = "New static menu board" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t8" ; label = "New New ceiling tiles" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t15" ; label = "Separate order/pay from pick-up" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t21" ; label = "Replace window sills W/ solid surface" ; width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t2" ; label = "New static queuing board" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t9" ; label = "New ceiling grid" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t16" ; label = "New 2x4 ligths in dining area" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t22" ; label = "Replace servicd counter back wall finishes" ; width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t3" ; label = "New static RHR" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t10" ; label = "New pendant lights" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t17" ; label = "Replace restroom finishes" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t4" ; label = "Self-serve drink - one freestyle" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t11" ; label = "Artpack" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t18" ; label = "Replace restroom fixtures" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t5" ; label = "Condiment stand" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t12" ; label = "WiFi service" ; width = 32; edit_width = 30; fixed_width = true; alignment = center;}
: toggle {key = "t19" ; label = "Freestyle in drive-thru" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
:row {
: toggle {key = "t6" ; label = "New drink stand (small, plumbed)" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t13" ; label = "All wood look porcelain plank tile" ; width = 32; edit_width = 30; fixed_width = true; alignment = center;}
: toggle {key = "t20" ; label = "New wall tile in drive-thru" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t7" ; label = "New drink stand (large, plumbed)" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t14" ; label = "Music W/ ceilng mounted speakers" ; width = 32; edit_width = 30; fixed_width = true; alignment = center;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
}
: row {
:boxed_radio_column {
label = "Exterior Options" ;
: row {
: toggle {key = "t23" ; label = "New building signage" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t24" ; label = "PUW vestibule" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t25" ; label = "Pre-order menu" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t26" ; label = "Remove directional signs" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t27" ; label = "Blade wall branding" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t28" ; label = "Landscaping" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t29" ; label = "Tag branding" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t30" ; label = "New architectural metal panels" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t31" ; label = "Canopy at pay window" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t32" ; label = "Paint (E) wall sconces" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t33" ; label = "Canopy at pick-up window" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t34" ; label = "New wall sconces" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t35" ; label = "Canopy of order station at DT" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
: row {
: toggle {key = "t36" ; label = "Paint (E) storefront" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: toggle {key = "t37" ; label = "Clearance bar" ; width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 32; edit_width = 30; fixed_width = true; alignment = left;}
: spacer {width = 40; edit_width = 35; fixed_width = true; alignment = left;}
}
}
}
ok_cancel ; //predefined Ok/Cancel Buttons
: row { //defines row
: paragraph { //adding text at bottom of dialog
: text_part { //define first line of text
label = "Developed by:"; //first line of text
} //end first line of text
: text_part { //define second line of text
label = "Chris Miske"; //second line of text
} //end second line of text
} //end paragraph
} //end of row
} //end dialog
Function:
(defun C:Opt_List () ;defines the function
(setq dcl_id (load_dialog "Opt_Menu")) ;loads the dialog box "pop-up menu"
(if (not (new_dialog "Opt_Menu" dcl_id)) ;if statement to exit if the .dcl file is not found
(princ "\n** DCL File not Found **") ;exits functiop with error message
) ;end if statement
(action_tile "t1" "(setq hole \"menu\")")
(action_tile "t2" "(setq hole \"queuing\")")
(action_tile "t3" "(setq hole \"RHR\")")
(action_tile "t4" "(setq hole \"freestyle\")")
(action_tile "t5" "(setq hole \"condiment\")")
(action_tile "t6" "(setq hole \"drink_small\")")
(action_tile "t7" "(setq hole \"drink_large\")")
(action_tile "t8" "(setq hole \"ceiling_tiles\")")
(action_tile "t9" "(setq hole \"ceiling_grid\")")
(action_tile "t10" "(setq hole \"pendant\")")
(action_tile "t11" "(setq hole \"artpack\")")
(action_tile "t12" "(setq hole \"wifi\")")
(action_tile "t13" "(setq hole \"wood_tile\")")
(action_tile "t14" "(setq hole \"speakers\")")
(action_tile "t15" "(setq hole \"separate\")")
(action_tile "t16" "(setq hole \"2x4\")")
(action_tile "t17" "(setq hole \"restroom_finishes\")")
(action_tile "t18" "(setq hole \"restroom_fixtures\")")
(action_tile "t19" "(setq hole \"drive-thru\")")
(action_tile "t20" "(setq hole \"wall_tile\")")
(action_tile "t21" "(setq hole \"sills\")")
(action_tile "t22" "(setq hole \"service\")")
(action_tile "t23" "(setq hole \"signage\")")
(action_tile "t24" "(setq hole \"vestibule\")")
(action_tile "t25" "(setq hole \"pre-order\")")
(action_tile "t26" "(setq hole \"directional\")")
(action_tile "t27" "(setq hole \"blade\")")
(action_tile "t28" "(setq hole \"landscape\")")
(action_tile "t29" "(setq hole \"tag\")")
(action_tile "t30" "(setq hole \"metal_panels\")")
(action_tile "t31" "(setq hole \"canopy_pay\")")
(action_tile "t32" "(setq hole \"paint_sconce\")")
(action_tile "t33" "(setq hole \"canopy_pick-up\")")
(action_tile "t34" "(setq hole \"new_sconce\")")
(action_tile "t35" "(setq hole \"canopy_DT\")")
(action_tile "t36" "(setq hole \"paint_storefront\")")
(action_tile "t37" "(setq hole \"clearance_bar\")")
(action_tile ;action tile for cancel button
"cancel" ;if cencel button is pressed
"(done_dialog) (setq UserClick nil)" ;close dialog without excuting dialog functions, set flag
) ;end action tile for Cancel button
(action_tile ;action tile for OK button
"accept" ;if OK button is pressed
"(done_dialog) (setq UserClick T))" ;close dialog and proceed to excute dialog functions, set flag
) ;end action tile for OK button
(start_dialog) ;exciute functions in dialog
(unload_dialog dcl_id) ;unload dialog after excuting functions
(princ)
) ;end defun C:Opt_List
(princ)
Solved! Go to Solution.