AutoCAD 2000/2000i/2002 Archive (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Layer Prefixing?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
139 Views, 4 Replies

Layer Prefixing?

G'day All,

Has anyone got a routine for putting a prefix in front of all
layernames?
For example, adding EX for existing to the front of all layers in a
drawing.

Regards

Scott V
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

command: _rename
in the dialog box choose "layer"
old name: *
rename to: ex*

If you want to delete the prefix type this:
old name: ex*
rename to: *


HTH
Juergen

"Viney, Scott" wrote:

> G'day All,
>
> Has anyone got a routine for putting a prefix in front of all
> layernames?
> For example, adding EX for existing to the front of all layers in a
> drawing.
>
> Regards
>
> Scott V
Message 3 of 5
Anonymous
in reply to: Anonymous

**********************************************
Sub chlayerprefix()
For Each ent In ThisDrawing.Layers
a = ent.Name
If ent.Name <> 0 Then
ent.Name = "Ex_" & CStr(a)
End If
Next ent
End Sub
************************************************
1. Copy the above lines
2. Hit ALT+F11
3. Insert > Module
4. Edit > Paste
5. File > Close and return to autocad
6. Hit ALT+F8
7. Click Run button.

Good Luck,
Madhanagopal
AutoCAD & MCAD Product Support, INDIA
WW Support & Services, Autodesk
Discussion Q&A: http://www.autodesk.com/discussion

"Jürgen Palme" wrote in message
news:3B16255E.D77793A7@debitel.net...
> command: _rename
> in the dialog box choose "layer"
> old name: *
> rename to: ex*
>
> If you want to delete the prefix type this:
> old name: ex*
> rename to: *
>
>
> HTH
> Juergen
>
> "Viney, Scott" wrote:
>
> > G'day All,
> >
> > Has anyone got a routine for putting a prefix in front of all
> > layernames?
> > For example, adding EX for existing to the front of all layers in a
> > drawing.
> >
> > Regards
> >
> > Scott V
>
>
Message 4 of 5
Anonymous
in reply to: Anonymous

Thanx for the help,

I was trying to do this with the command line version, which (EDITED) when using a * for the OLD NAME

Cheers

Scott V

"Viney, Scott" wrote:

> G'day All,
>
> Has anyone got a routine for putting a prefix in front of all
> layernames?
> For example, adding EX for existing to the front of all layers in a
> drawing.
>
> Regards
>
> Scott V
Message 5 of 5
Anonymous
in reply to: Anonymous

FYI

 

You can change any prefix by modifying the following line in that
program

 


color=#008000>'**********************************************
Sub
chlayerprefix()
For Each ent In ThisDrawing.Layers
a = ent.Name
If
ent.Name <> 0 Then

'Old name
"Ex_"           

'ent.Name = "Ex_" & CStr(a)

'New Name "A"
ent.Name =
color=#ff0000>"A"
& CStr(a) 
End If
Next ent
End
Sub

color=#008000>'************************************************
--

Madhanagopal
AutoCAD & MCAD Product Support, INDIA
WW Support
& Services, Autodesk
Discussion Q&A:
href="http://www.autodesk.com/discussion">http://www.autodesk.com/discussion


>
Thanx for the help,
>
> I was trying to do this with the command
line version, which (EDITED) when using a * for the OLD NAME
>
>
Cheers
>
> Scott V
>
> "Viney, Scott" wrote:
>

> > G'day All,
> >
> > Has anyone got a routine for
putting a prefix in front of all
> > layernames?
> > For
example, adding EX for existing to the front of all layers in a
> >
drawing.
> >
> > Regards
> >
> > Scott
V
>

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

Post to forums  

Autodesk Design & Make Report