Results 1 to 4 of 4

Thread: Block-Change Number to Match Attribute Value

  1. #1
    Member
    Join Date
    2008-08
    Posts
    6
    Login to Give a bone
    0

    Default Block-Change Number to Match Attribute Value

    I am running Autocad 2004 and trying to build blocks of PLC I/O cards to quickly insert into drawings. I've got the block so it will prompt for a Rack number and a Slot number and insert them as attributes above the I/O card. Is it possible to have the point addresses change automatically to match the Slot number? I've tried just copying and pasting the Slot number and putting it in each point address, but then it prompts me to enter the Slot number for each point. I would like to have it change automatically. I'll attach a .dwg that helps explain what I want. If need be I can break up the Point Address into multiple pieces. I would only need the X in the Point Address I:X/00 to change. It's range would be 1-99. The max number of Point Addresses is 16. If you need any more info, please let me know. Thanks in advance.
    Attached Files Attached Files

  2. #2
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Block-Change Number to Match Attribute Value

    There's no Automatic way at present. Using Fields you can set-up a block with the slot # linked to the main Slot number at the top (Copy the field code generated to the other attribs). Then use Copy to create new blocks instead of insert - that way the Fields are updated to point to the new block automatically.

    BTW, you'll have to rename the 2nd SLOT attribute - you are asking for trouble when you've got 2 attribs in the same block named the same. If you use anything like ATTSYNC you're going to have some data loss. The Enhanced Attribute Editor actually shows you there's a problem - see the attached, notice the SLOT tag is marked in RED.
    Attached Images Attached Images

  3. #3
    Member
    Join Date
    2008-08
    Location
    Hyderabad, India
    Posts
    3
    Login to Give a bone
    0

    Default Re: Block-Change Number to Match Attribute Value

    Quote Originally Posted by jjochum View Post
    I am running Autocad 2004 and trying to build blocks of PLC I/O cards to quickly insert into drawings. I've got the block so it will prompt for a Rack number and a Slot number and insert them as attributes above the I/O card. Is it possible to have the point addresses change automatically to match the Slot number? I've tried just copying and pasting the Slot number and putting it in each point address, but then it prompts me to enter the Slot number for each point. I would like to have it change automatically. I'll attach a .dwg that helps explain what I want. If need be I can break up the Point Address into multiple pieces. I would only need the X in the Point Address I:X/00 to change. It's range would be 1-99. The max number of Point Addresses is 16. If you need any more info, please let me know. Thanks in advance.
    I think it can be possible.
    Value of an attrib can be copied automatically to the value of other attrib.
    Let me first check it as an experiment. I will inform back soon. plz wait

  4. #4
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Block-Change Number to Match Attribute Value

    Quote Originally Posted by jjochum View Post
    I am running Autocad 2004
    Sorry, scratch what I said about Fields. You don't have that in 2004, maybe RText can do this - but not having used it that much I can't tell. The only thing I can think of to do this "automatically" would be to create some form of Lisp Reactor to fire each time an attribute is changed.

    Otherwise if you only want point B (in your drawing) to be updated to what the user input for A at insert - then a lisp routine to custom insert & then change the values might work. Just note that if the user changes A later B won't update in this case - for that a reactor would probably be the only way.

Similar Threads

  1. change block elevation to match attribute value
    By SurveyorHead in forum AutoLISP
    Replies: 6
    Last Post: 2015-04-05, 03:23 AM
  2. [Electrical] Possible to increment a number which is an attribute in a block?
    By seth357792 in forum AutoCAD Electrical - General
    Replies: 2
    Last Post: 2013-09-18, 09:55 PM
  3. Replies: 13
    Last Post: 2012-09-18, 07:51 PM
  4. Replies: 8
    Last Post: 2007-02-06, 05:31 PM
  5. Replies: 9
    Last Post: 2006-07-11, 11:09 PM

Posting Permissions

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