- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello guys, i'am a novice on this, i have read about dcl and i was able to create one
************************************************************************************************************************************************
title : dialog {
label = "Drawing Title" ;
:boxed_radio_column {
label = "Type" ;
: radio_button {
key = "rb1" ;
label = "&Title" ;
value = "1" ;
}
: radio_button {
key = "rb2" ;
label = "&Detail" ;
}
: radio_button {
key = "rb3" ;
label = "&Section" ;
}
:edit_box {
label="Drawing Name: ";
key = "name";
edit_limit = 30;
edit_width = 30;
}
:edit_box {
label="Drawing Scale: ";
key = "scale";
edit_limit = 30;
edit_width = 30;
}
}
ok_cancel ;
: paragraph {
: text_part {
label = "Designed and Created";
}
: text_part {
label = "by AkosiChris";
}
}
}
************************************************************************************************************************************************
now i want an lisp file that when i click radio button "Title" it would insert a block that will use the data on edit_box "Drawing name" and "drawing scale". Same should happen if i click "Detail" or Section"
I;am having a hard time on this, so far i can only load the dcl but i dont know the code to insert the block and call the data in edit_box to be in the attribute of the inserted block.
************************************************************************************************************************************************
(defun C:title ()
(setq p1 (getpoint "\nPick Insertion point:"))
(setq radio_option $value)
if(= radio_option "rb1")
(cond
((=radio_option "0") (command "-Insert" "STEPUP.dwg" "_non" pt "" pause))
((=radio_option "1") (command "-Insert" "STEPUP.dwg" "_non" pt "" pause))
)
)
(if(= radio_option "rb2")
((=radio_option "0") (command "-Insert" "STEPSLOPE.dwg" "_non" pt "" pause))
((=radio_option "1") (command "-Insert" "STEPSLOPE.dwg" "_non" pt "" pause))
)
)
)
(setq dcl_id (load_dialog "drawingtitle.dcl"))
(if (not (new_dialog "title" dcl_id)
)
(exit)
)
(set_tile "A/1" "Enter Number/Letter Here")
(mode_tile "name" 2)
(action_tile "A/1" "(setq A/1 $value)")
(action_tile "rdwg" "(setq rdwg $value)")
(action_tile "rb1" "(setq hole \"title\")")
(action_tile "rb2" "(setq hole \"scale\")")
(action_tile
"cancel"
"(setq ddiag 1) (done_dialog) "
)
(action_tile
"accept"
"(setq ddiag 2) (done_dialog) "
)
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
(princ)
************************************************************************************************************************************************
Solved! Go to Solution.