Wildcard Character * Not Allowing Renaming of Multiple Layers

Wildcard Character * Not Allowing Renaming of Multiple Layers

Anonymous
Not applicable
7,004 Views
20 Replies
Message 1 of 21

Wildcard Character * Not Allowing Renaming of Multiple Layers

Anonymous
Not applicable

In the RENAME dialog, I am using the *wildcard character to rename multiple layers.
See Attached.
But No Layers are renamed.
What's the problem?

Thanks

0 Likes
Accepted solutions (1)
7,005 Views
20 Replies
Replies (20)
Message 2 of 21

dbroad
Mentor
Mentor

I don't believe the rename command supports bulk renaming with wildcards.  You would need to write a program for that I think.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 21

kadmonkee
Advisor
Advisor

try changing the syntax

*Anno* doesn't match the actual name

you may need to include the tilde symbol






If there is any information shared that is of value please give Kudos
If a solution is provided by any posters please mark them as Solved to benefit everyone else.
thank you
0 Likes
Message 4 of 21

vladimir_michl
Advisor
Advisor

You can use RRENAME for complex renaming of AutoCAD layers and other named objects. It supports also regular expresssions.

 

See http://www.cadforum.cz/cadforum_en/rename-on-steroids-complex-renaming-of-autocad-objects-tip9265

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

0 Likes
Message 5 of 21

Anonymous
Not applicable

Works fine here, I believe your issue result from using a wildcard character in the layer name itself.  The tilde (~) is a wildcard character and using it in layer names is probably affecting the rename capabilities.

 

rename1.PNGrename2.PNG

Message 6 of 21

dbroad
Mentor
Mentor

Looks like it will work for changing prefixes, but I can't make it change an internal substring.  Can you?

 

1-Layer1

2-Layer2

3-Layer3

4-Layer4

etc.

 

rename old name:*Layer*,  New name: *L*

 

won't work.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 7 of 21

vladimir_michl
Advisor
Advisor

With RRENAME you can rename (just by entering "Layer" --> "L"):

 

1-Layer1 --> 1-L1

2-Layer2 --> 2-L2

3-Layer3 --> 3-L3

 

But you can even rename e.g.:

 

1-LayerA --> A-L1

2-LayerB --> B-L2

3-LayerC --> C-L3

 

by entering "(.+)-Layer(.+)" --> "$2-L$1"

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

 

0 Likes
Message 8 of 21

serkancavuslar
Collaborator
Collaborator
Accepted solution

Hi @Anonymous

 

Command "lrn"

LayerName Rename

 

Replace

 

Turkey / Istanbul

 

LayerRename.png

Serkan ÇAVUŞLAR
CplCAD / Türkiye
Message 9 of 21

kadmonkee
Advisor
Advisor

here is a list of Acceptable wildcards for Autocad

 

Character
Definition

# (Pound)
Matches any numeric digit

@ (At)
Matches any alphabetic character

. (Period)
Matches any nonalphanumeric character

* (Asterisk)
Matches any string and can be used anywhere in the search string

? (Question mark)
Matches any single character; for example, ?BC matches ABC, 3BC, and so
on

~ (Tilde)
Matches anything but the pattern; for example; ~*AB*matches all strings
that don't contain AB

[ ]
Matches any one of the characters enclosed; for example, [AB]C matches
AC and BC

[~]
Matches any character not enclosed; for example, [~AB]C matches XC but
not AC

[-]
Specifies a range for a single character; for example, [A-G]C matches
AC, BC, and so on to GC, but not HC

` (Reverse quote)
Reads the next character literally; for example, `~AB matches ~AB






If there is any information shared that is of value please give Kudos
If a solution is provided by any posters please mark them as Solved to benefit everyone else.
thank you
Message 10 of 21

Anonymous
Not applicable

In addition to @kadmonkee 's list it is important to remember NOT to use any of those characters in layer names (or any other name for that matter).

Message 12 of 21

serkancavuslar
Collaborator
Collaborator

Some solutions can be very simple and practical.

This method is very easy and very practical as you can see.

 

 

Serkan ÇAVUŞLAR
CplCAD / Türkiye
Message 13 of 21

Anonymous
Not applicable

Thanks for the .lsp file for advanced renaming functionality, since the standard RENAME dialog apparently does not permit multiple * characters.

It successfully solved my particular layer renaming task. It even successfully dealt with the tilde character I had as part of my layer name, which I removed as part of the layer name, since it is a wildcard character itself (kadmonkee's list & rculp's advice, thanks)

0 Likes
Message 14 of 21

Anonymous
Not applicable

RENAME works quite well using wildcards, your problem was the wildcard character you used in the layer name. Don't do that and RENAME works fine.

Message 15 of 21

Anonymous
Not applicable

Do you have a similar lisp file for renaming blocks?

Message 16 of 21

ntodd
Observer
Observer

Someone has used '_' underscore instead of '-' hyphen in multiple layers. I want to change those layers to use a hyphen. The wildcards didn't work. Any thoughts?

Thanks!

0 Likes
Message 17 of 21

RobDraw
Mentor
Mentor

@ntodd wrote:

The wildcards didn't work.


 

Which wildcard did you use and how did you apply it?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 18 of 21

Anonymous
Not applicable

I'm not sure why people are ignoring this, but this RRename, rocks! Thank you.

Message 19 of 21

RobDraw
Mentor
Mentor

What makes you think it is being ignored?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 20 of 21

Anonymous
Not applicable

Hello,

 

this seems not to work for AutoCAD Archtitecture 2019. It just says unnown command "LayerName"

 

Any solution for this?

0 Likes