• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Electrical

    Reply
    Active Member
    Posts: 8
    Registered: ‎01-02-2007

    TEXT REPLACEMENT SCRIPT (RE)

    74 Views, 4 Replies
    01-03-2007 12:09 PM
    I'm re-posting this since I didn't get any answer the first time.

    I wrote a script to change multiple attributes in my title block. All but one of the attributes changed flawlessly. I used the same format to change the other one, but for some reason it doesn't work. It says:
    Enter attribute value specification <*>:

    0 attributes selected.*Invalid*

    Here is my script. Everything works until it prompts "Enter attribute value specification <*>:" when I'm changing the attribute "REV1ECN#"

    -ATTEDIT
    N
    N
    BORDERPSC-D
    REV1


    1
    -AT TEDIT
    N
    N
    BORDERPSC-D
    REV1BY


    DRZ
    -ATTEDIT
    N
    N
    BORDERPSC-D
    REV1DESCRIPTION


    NO CHANGES THIS SHEET
    -ATTEDIT
    N
    N
    BORDERPSC-D
    REV1DATE


    1/2/07
    -AT TEDIT
    N
    N
    BORDERPSC-D
    REV1ECN#


    --

    The problem is not that I don't have the "*" in the blank field. I've tried putting it in, and I get the same problem. "?" does not fix the problem either. At first I thought that AutoCAD didn't like the "--" that I put in the string field, but the error occurs before it even prompts for that string. I tried putting in letters instead just in case and that didn't work either.
    Please use plain text.
    Active Contributor
    Posts: 46
    Registered: ‎04-20-2005

    Re: TEXT REPLACEMENT SCRIPT (RE)

    01-03-2007 01:53 PM in reply to: hayj
    Are you sure you have the attribute named REV1ECN#
    in that block or could it be misspelled?
    I tried a test and it seems to work but if the attribute doesn't exist in the block it will go to the command prompt.
    Please use plain text.
    Distinguished Contributor
    Posts: 145
    Registered: ‎03-30-2006

    Re: TEXT REPLACEMENT SCRIPT (RE)

    01-04-2007 07:18 AM in reply to: hayj
    Are you using the # in the attribute name as a wildcard or is it in the attribute name?

    Sven Kloeck
    Electrical Network Design
    Please use plain text.
    Active Member
    Posts: 8
    Registered: ‎01-02-2007

    Re: TEXT REPLACEMENT SCRIPT (RE)

    01-04-2007 09:24 AM in reply to: hayj
    No, the attribute name is REV1ECN#. No wildcards. Just in case it was my mind playing tricks on me, I copied it straight out of AutoCAD and put it in the script. Could it be that AutoCAD doesn't like the #? Is there a wildcard symbol that I could put in its place so that it would recognize the first part of the attribute name? For instance, would it recognize REV1ECN*? I guess I could change the block to remove it, but that block has been used on thousands of drawings so far.
    Please use plain text.
    Active Member
    Posts: 8
    Registered: ‎01-02-2007

    Re: TEXT REPLACEMENT SCRIPT (RE)

    01-04-2007 09:27 AM in reply to: hayj
    I guess I should have tried before asked. The "*" worked as a wildcard. AutoCAD must not have understood the #. Thanks for the help guys.
    Please use plain text.