Small Fish Posted November 10, 2009 Posted November 10, 2009 Hi I am trying make something similar to the GATTE command except more user friendly - ie with a small dialog box. I can return a value from the dialog box with a new text string but how do I go the next step to change the attributed tag globally? Thanks for any help (defun c:Gattes (/ blk tag val tg bn ) (vl-load-com) (setq ESel (nentsel "\nSelect attribuite tag: ")) (setq TextString(cdr (assoc 1 (entget (car ESel)))));existing text string (GattesDCL);activate dialob box (setq EL (entget (car ESel)));Entity list (setq bn (cdr (assoc 2 EL)));block name ????? (princ) ) (defun Get_DLG (/ ) (setq TextString (get_tile "TextString")) (done_dialog 1) );defun (defun GattesDCL ( / DLGID ) (setq DLGID (load_dialog "Gattes.dcl")) (if (new_dialog "Gattes" DLGID) (progn (set_tile "TextString" TextString); (action_tile "accept" "(Get_DLG)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) (unload_dialog DLGID) );progn (princ "\nNo DCL");the dialog box was not found );if );defun ;--------------------------------------------------- //dcl dcl_settings : default_dcl_settings { audit_level = 3; } Gattes : dialog { label = "Global attribute Edit"; : boxed_column { label = "" ; fixed_width = true ; : row { : column { : text { label = "Text String"; } }//column : column { : edit_box { key = "TextString"; width = 30; } }//column }//row spacer_1; }//boxed column errtile; ok_cancel; }//dialog Quote
alanjt Posted November 10, 2009 Posted November 10, 2009 SSGet all matching blocks and iterate through them. Quote
jalucerol Posted November 10, 2009 Posted November 10, 2009 Try this, is similar but in vb6 http://www.cadtutor.net/forum/showthread.php?t=41414 Quote
Small Fish Posted November 10, 2009 Author Posted November 10, 2009 Thanks I was looking at Lee mac's EdAtt.lsp, and this seems to be just what I want. So why reinvent the wheel? Its very clever......... 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.