Jump to content

Global Attribute edit


Small Fish

Recommended Posts

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

Link to comment
Share on other sites

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.........

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...