+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Senior Member Small Fish's Avatar
    Using
    AutoCAD 2010
    Join Date
    May 2009
    Location
    Tauranga
    Posts
    282

    Default Global Attribute edit

    Registered forum members do not see this ad.

    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

    Code:
    (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

  2. #2
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,199

    Default

    SSGet all matching blocks and iterate through them.
    DropBox
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  3. #3
    Full Member jalucerol's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2009
    Location
    Mendoza, Argentina
    Posts
    33

  4. #4
    Senior Member Small Fish's Avatar
    Using
    AutoCAD 2010
    Join Date
    May 2009
    Location
    Tauranga
    Posts
    282

    Default

    Registered forum members do not see this ad.

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

Similar Threads

  1. GATTE 2 (Global Attribute Edit with Layout Select)
    By SteveK in forum AutoLISP, Visual LISP & DCL
    Replies: 29
    Last Post: 31st Jul 2017, 02:04 pm
  2. Global Block Hatch Edit
    By martymoose in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 4th Aug 2009, 11:51 pm
  3. Creating tool (lisp) for copy attribute and global attribute edit
    By MarcoW in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 14th May 2009, 10:41 am
  4. Global Attribute command
    By Scott44 in forum AutoCAD General
    Replies: 1
    Last Post: 18th Jun 2008, 11:22 pm
  5. Global Spot Grade Edit.....
    By El Jefe '36 in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 20th Nov 2007, 06:11 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts