Force attributes to match

Discussion in 'AutoCAD' started by Xolo, Jun 21, 2004.

  1. Xolo

    Xolo Guest

    Hello everyone,

    Is it possible somehow to force attributes in an attributable block to match
    when only one is changed?

    I know 2005 has those fields instead of attributes, but I'm not using 2005
    (neither do I plan to for years). I just want to know if there's an easy way
    for attributes (within the same block) to be set equal to another attribute,
    making editing of attributable blocks go way faster.

    Is there some sort of code that can be entered into the attribute to force
    it to automatically read a different attribute? Or is there a system
    variable that can be used to allow this to work? Or is there some other way
    for this to be allowed to happen?

    Thanks everyone,

    Xolo
     
    Xolo, Jun 21, 2004
    #1
  2. Xolo

    ECCAD Guest

    Unfortunate, but NO, there is no 'easy' way to do this. Each instance of a 'block' insert - with attributes, may or may not have a 'value' set into the particular attribute (may be nil), all attribute (attdef entities) have a 'tag' name. You could have a routine to pick a particular block/attribute, get it's value, and then pick other matching blocks, and force that value into that particular tag's value. Is that what you are after ?

    Bob
     
    ECCAD, Jun 21, 2004
    #2
  3. Xolo

    Xolo Guest

    Bob,

    Not exactly what I want no....the attributes that I want to match up are
    going to be within the same attributable block, like pressure ratings. When
    one of the pressures changes, I would like for all of the pressures to be
    changed automatically (the exact same pressure rating is used multiple times
    within the block) to the same without having to go through the entire block
    to change each one.

    But that other item you mentioned would be a nice routine to have too, being
    able to change different block attributes to a certain attribute somewhere
    in your other blocks.

    Thanks for the help on this one,

    Xolo

    Unfortunate, but NO, there is no 'easy' way to do this. Each instance of a
    'block' insert - with attributes, may or may not have a 'value' set into the
    particular attribute (may be nil), all attribute (attdef entities) have a
    'tag' name. You could have a routine to pick a particular block/attribute,
    get it's value, and then pick other matching blocks, and force that value
    into that particular tag's value. Is that what you are after ?

    Bob
     
    Xolo, Jun 21, 2004
    #3
  4. Xolo

    RichardG Guest

    (defun c:ac ()

    (prompt "\nSelect attributes: ")

    (command "-attedit" "n" "" "" "" "")

    (princ)

    )

    here's a simple workaround using -attedit. I use it alot for changing values
    in blocks with attributes. It's kind of search and replace and works real
    good if what you want to change something quickly and on the fly. You can
    rework this to search for specific blocks or tags. I even use this when I
    have to change one "unique" digit of a number. It also works on a global
    basis on what ever you select. Give it a shot it might work for your needs
    until something better comes along.
    Richard
     
    RichardG, Jun 22, 2004
    #4
  5. Xolo

    ECCAD Guest

    Try this one: RA = Replace Attribute..does partial strings.

    (defun C:RA ()
    (command "_attedit" "_n" "_y" "" "" "")
    (princ)
    ); end function

    Bob
     
    ECCAD, Jun 22, 2004
    #5
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.