PDA

View Full Version : Adding a suffix to certain Layer names



mtlynn
2007-01-04, 05:54 PM
I'm looking for a routine that put's letters in front of certain layers in the dialog box.

example: layer Curb becomes, CB-Curb.

Let me know if this can be acomplished.

Thanks

Opie
2007-01-04, 05:57 PM
How do you plan on doing it? Is the original layer to remain? Have you tried the Layer Translator command (LAYTRANS)?

T.Willey
2007-01-04, 07:07 PM
If you are looking to rename the layer, then yes it can be done. When you code it though, you will have to make sure that the new layer doesn't exist in the drawing already.

rkmcswain
2007-01-04, 07:25 PM
I'm looking for a routine that put's letters in front of certain layers in the dialog box.

example: layer Curb becomes, CB-Curb.

Let me know if this can be acomplished.

Thanks

The same letters in front of each layer? If so, then you can use the dialog version of the ._RENAME command. You can use wildcards to specify the source layers.

madcadder
2007-01-04, 07:54 PM
If you are looking to rename the layer, then yes it can be done. When you code it though, you will have to make sure that the new layer doesn't exist in the drawing already.

To finish that sentence...

...which can be done with a tablesearch.



(IF (not (TBLSEARCH "layer" "layer name here"))
(**run what to do is not there**)
(**run what to do if there**)
)

mtlynn
2007-01-04, 08:03 PM
Yes, The same letters in front of each layer that needs them.

rkmcswain
2007-01-04, 08:20 PM
Yes, The same letters in front of each layer that needs them.

Sorry, I just realized this was the lisp group and that you are probably looking for a way to programatically do this huh?