AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TEXT REPLACEMENT SCRIPT (RE)

4 REPLIES 4
Reply
Message 1 of 5
hayj
254 Views, 4 Replies

TEXT REPLACEMENT SCRIPT (RE)

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.
4 REPLIES 4
Message 2 of 5
joechrobak
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.
Message 3 of 5
sven_kloeck
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
Message 4 of 5
hayj
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.
Message 5 of 5
hayj
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost