gS7 Posted March 1, 2013 Posted March 1, 2013 Hello Cad tutor I Need Help with DCL File DCL CODE Insert_Block :dialog {label="Insert Block:"; :boxed_radio_column{label="Input Coordinates"; :edit_box{label="Easting:"; key="est"; edit_width = 20; edit_limit = 20; mnemonic = "E"; //alignment = "Right"; value= "0"; is_tab_stop = true; } :edit_box{label="Northing:"; key="north"; edit_width = 20; edit_limit = 20; mnemonic = "N"; //alignment = "Right"; value= "0"; is_tab_stop = true; } } :boxed_radio_row{label="Block"; :button{label="Select Block:"; key="Block"; fixed_width = true; //alignment = centered; is_default = true; } } :text { key="file"; } :boxed_radio_row{ :button{label="PLOT"; key="accept"; fixed_width = true; is_default=true; } :button{label="EXIT"; key="cancel"; fixed_width = true; is_default=false; is_cancel=true; } } :text_part {label="Designed and Created:"; } :text_part {label="By Ganesh Shetty"; } } Autolisp Code: (defun c:TEst (/ est north filename flag dcl_id) (setq flag 4) (setq filename "No Block Selected") (setq dcl_id (load_dialog "C:/Insert_point.dcl")) (while (> flag 2) (if (not (new_dialog "Insert_Block" dcl_id)) (exit) ) (set_tile "file" filename) (action_tile "cancel" "(done_dialog 0)") (action_tile "accept" "(done_dialog 1)") (action_tile "Block" "(done_dialog 4)") (action_tile "est" "(setq est $value)") (action_tile "north" "(setq north $value)") (setq flag (start_dialog)) (if (= flag 0) (princ "\nFunction Cancelled:") ) (if (= flag 1) (progn (setq cor (strcat est "," north)) (command "-insert" filename "_non" cor "" "" "") (command "Zoom" "e") ) ) (if (= flag 4) (progn (setq filename (getfiled "Select Block" "" "dwg" ) (if (= filename nil) (setq filename "Block not Selected") ) ) ) ) (unload_dialog dcl_id) (princ) ) Here i had Two problem 1. after selecting block Easting (X) & Northing (Y) Values i must reenter both Values 2.if the Block is not Found i want to put error massage please help me to fix this Quote
Recommended Posts
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.