AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
Active Member
hayj
Posts: 8
Registered: ‎01-02-2007
Message 1 of 5 (99 Views)

TEXT REPLACEMENT SCRIPT (RE)

99 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.
Active Contributor
joechrobak
Posts: 46
Registered: ‎04-20-2005
Message 2 of 5 (99 Views)

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.
Distinguished Contributor
sven_kloeck
Posts: 145
Registered: ‎03-30-2006
Message 3 of 5 (99 Views)

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
Active Member
hayj
Posts: 8
Registered: ‎01-02-2007
Message 4 of 5 (99 Views)

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.
Active Member
hayj
Posts: 8
Registered: ‎01-02-2007
Message 5 of 5 (99 Views)

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.
Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.