(defun c:SETSC
(/ *error* dch dcl des sng sngReturn cursc newsc
) )
)
)
)
)
)
)
)
(princ "\nUnable to open DCL for writing.") )
'(
"ed : edit_box { alignment = left; width = 25; edit_width = 10; fixed_width = true;}"
""
"setscale : dialog { spacer; key = \"dcl\";"
" : boxed_radio_column { key=\042key\042; label = \"Select Drawing Scale\"; height = 1.0;"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button01\"; label = \"1. --> 1:50\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button02\"; label = \"2. --> 1:100\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button03\"; label = \"3. --> 1:200\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button04\"; label = \"4. --> 1:250\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button05\"; label = \"5. --> 1:500\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button06\"; label = \"6. --> 1:2000\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button07\"; label = \"7. --> 1:2500\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button08\"; label = \"8. --> 1:5000\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button09\"; label = \"9. --> 1:10000\";"
" }"
" : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
" key = \"radio_button10\"; label = \"10. --> 1:20000\";"
" }"
" : ed {height = 1.0; width = 25; is_tab_stop = true;"
" key = \"other\"; label = \"Other:\";"
" }"
" : ed {height = 1.0; width = 25; is_enabled = false;"
" key = \"oldscale\"; label = \"Old Scale:\";"
" }"
" }"
" ok_only;"
" }"
)
)
)
(<= dch 0)
)
(princ "\nUnable to load DCL file.") )
(princ "\nUnable to display 'setscale' dialog.") )
(t
(set_tile "oldscale" (itoa cursc
)) ; set the old scale in the dialog box (action_tile "key" "(progn (setq sngReturn (atoi (get_tile \"other\"))) (setq sng $value))") ( (eq sng
"radio_button01") 50 ) ( (eq sng
"radio_button02") 100 ) ( (eq sng
"radio_button03") 200 ) ( (eq sng
"radio_button04") 250 ) ( (eq sng
"radio_button05") 500 ) ( (eq sng
"radio_button06") 2000 ) ( (eq sng
"radio_button07") 2500 ) ( (eq sng
"radio_button08") 5000 ) ( (eq sng
"radio_button09") 10000 ) ( (eq sng
"radio_button10") 20000 ) ( (eq sng
"other") sngReturn
) ( (eq sng
"oldscale") cursc
) )
)
(princ "\nThe drawing scale is 1:")(princ sngReturn
) )
)
)
)
(*error* nil)
)