Connect Autolisp file to my Dialog box file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello! I recently just created a dialog box which i think I've got looking almost exactly how i want it to look.
Now i am trying to create the Autolisp file that calls forward the dialog box, and then performs actions based off of the users input.
At first the dialog box was popping up, and you could check/uncheck the boxes and also type in the text field. Now when i try to open the dialog box it pops up but then instantly closes. I'm getting the error on my command line "; error: too many arguments".
So i guess the first part of fixing this would be to stop it from instantly closing.
The second part is making it functional. The purpose of this dialog box is to rename my current layout based off of which options are selected in the dialog window. Ideally you would check the boxes, then based off of what is checked it would then get passed down to the text field, then when you click ok whatever is in the text field would then get passed to your current tab name.
I will post both the dcl code and lisp code below. Please give me any advice you may have, all input is appreciated.
layoutrename : dialog {
label = "Edit Layout Title" ;
: row {
:boxed_row {
label = "Select Layout Options" ;
: toggle {
key = "tb1" ;
label = "Plan" ;
value = "1" ;
}
: toggle {
key = "tb2" ;
label = "Elevations" ;
}
: toggle {
key = "tb3" ;
label = "Sections" ;
}
: toggle {
key = "tb4" ;
label = "Details" ;
}
: toggle {
key = "tb5" ;
label = "Isometrics" ;
}
: toggle {
key = "tb6" ;
label = "Fabrications" ;
}
}
}
: row {
: edit_box {
key = "eb1" ;
label = "Layout Name :" ;
edit_width = 60 ;
}
}
ok_cancel ;
}
(defun C:layoutrename ()
(setq layoutname "test")
(setq dclfilename "layoutrename.dcl")
(setq dialogname "layoutrename")
(setq dcl_id (load_dialog dclfilename))
(new_dialog dialogname dcl_id)
(action_tile "tb1" "(setq layoutname (strcat layoutname "Plan"))")
(action_tile "tb2" "(setq layoutname (strcat layoutname "Elevations"))")
(action_tile "tb3" "(setq layoutname (strcat layoutname "Sections"))")
(action_tile "tb4" "(setq layoutname (strcat layoutname "Details"))")
(action_tile "tb5" "(setq layoutname (strcat layoutname "Isometrics"))")
(action_tile "tb6" "(setq layoutname (strcat layoutname "Fabrications"))")
(set_tile "eb1" layoutname)
(action_tile
"cancel"
"(done_dialog)"
)
(action_tile
"accept"
"(command "-layout" "r" layoutname "")"
"(done_dialog)"
)
(start_dialog)
(unload_dialog dcl_id)
)