Update text height of block attributes - ACAD2004

Discussion in 'AutoCAD' started by strawberry, Jun 16, 2006.

  1. strawberry

    strawberry Guest

    Hi,

    On Monday, I've got to update the text height of block attributes in
    about a dozen different blocks, on each of about half-a-dozen drawings.

    The steps that I propose to use for each drawing are as follows:

    1. Modify the text height of each of the attributes in each of the
    original wblocks to get them to look as I want.
    2. Open the drawing.
    3. Temporarily rename each of the relevant blocks and switch to the
    block insertion layer. This is the same layer for all of these blocks.
    4. Insert and explode the amended wblock(s).
    5. ATTREDEF the old (temporarily renamed) block(s), select the new
    block objects, taking care to select the atributes in the correct
    order.
    6. Rename the blocks back again.

    I imagine this will take most of the day. Is there a better way?

    Any help appreciated.

    I'm using ACAD2004.
     
    strawberry, Jun 16, 2006
    #1
  2. strawberry

    Mr. B Guest

    Try this LISP routine. You enter the Number of Attributes you want to
    change... enter a new height, then select them (Window or Cross selection).



    ;; This Lisp routine changes a User specified number of Attributes
    ;; "globally" to a new HEIGHT


    ; ERROR MESSAGE ***********
    (defun *error* (s)
    (if old_error (setq *error* old_error))
    (princ)
    )

    (defun C:ATH (/ NewV OldV )
    (setq nmbr (strcase (getstring"\nEnter Number of Attributes to change: ")))
    (setq nmbr (atoi nmbr))
    (setq cntr 0) ; repeat counter

    (setq NewV (strcase (getstring "\nEnter New Attribute Height: ")))
    (command "attedit" "" "" "" "" "w" pause pause "H" NewV "")
    (setq cntr (+ 1 cntr))

    (while
    (/= nmbr cntr)
    (if (/= nmbr cntr) (command "H" NewV ""))
    (setq cntr (+ 1 cntr))
    ) ;while
    (COMMAND "") (COMMAND "")
    ) ;defun end



    Regards,

    BruceF
     
    Mr. B, Jun 16, 2006
    #2
  3. strawberry

    strawberry Guest

    Thanks Mr. B, I'll definitely give that a go . Let you know how I get
    on.

    Cheers.
     
    strawberry, Jun 17, 2006
    #3
  4. strawberry

    strawberry Guest

    In the end,because I also had to update some of the geometry within
    each wblock, I decided to go with my method.

    Actually it was much quicker than I anticipated. The whole process only
    took about 3hrs (including revising the wblocks).

    Anyone wishing to use my method will obviously need to purge the
    drawing prior to renaming the blocks back to their original names.

    A useful tip is to work through the blocks one at a time, copying the
    old names to the clipboard and temporarily renaming them simply by
    adding an 'x', say, to the end.

    Anyway, cheers
     
    strawberry, Jun 19, 2006
    #4
  5. strawberry

    tjhdesign Guest

    Hey thats a pretty cool little lisp routine.
    Works great.
     
    tjhdesign, Jun 23, 2006
    #5
  6. strawberry

    tjhdesign Guest

    Hey thats a pretty cool little lisp routine.
    Works great.
     
    tjhdesign, Jun 23, 2006
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.