Jump to content

Replacing Layers with other ones


Rubbersnow

Recommended Posts

Hey Guys, I have the following problem.

I'm working on HVAC project and after I have almost finished the whole project the managers company sent me new template layers file ,that I should follow. So now my "17_COOL_MEPA_SUP" layer and all of his futures (including color,line thicknes and so on) need to be changed to "10_C_HVAC_S" with other futures (different color,different thicknes). I know that I can rename group of layers by using script file ,but can I totally replace group of layers with another group?

 

P.S. I have 130 drawings ,so the manual method is not an option.

 

HEEEEELLLLPPPPP!!!! :shock:

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • Rubbersnow

    10

  • steven-g

    6

  • ReMark

    4

  • rkent

    2

Popular Days

Top Posters In This Topic

Then I think your only option is a script or LISP, there is no built in command for bulk rename, unless you could use *wildcard* changes for common parts of a name.

Link to comment
Share on other sites

AutoCAD 2011. Does that version have the Layer Translator command?

 

In the Layer Translator, you specify the layers in the current drawing that you want to translate, and the layers to translate them to. The translation maps the layers in the current drawing to different layer names and layer properties in a specified drawing or standards file, and then converts them using those mappings.

Link to comment
Share on other sites

what do you mean?

If you have microsoft Excel it's pretty easy to make a script with that, if you have Excel I can post an example

 

EDIT: Just spotted ReMarks answer, that may be easier

Link to comment
Share on other sites

yes, I just tried it. "-LAYTRANS" . Is it working for my purpose

AutoCAD 2011. Does that version have the Layer Translator command?

 

In the Layer Translator, you specify the layers in the current drawing that you want to translate, and the layers to translate them to. The translation maps the layers in the current drawing to different layer names and layer properties in a specified drawing or standards file, and then converts them using those mappings.

Link to comment
Share on other sites

yes I have excel. It will be great help if you send me example.

If you have microsoft Excel it's pretty easy to make a script with that, if you have Excel I can post an example

 

EDIT: Just spotted ReMarks answer, that may be easier

Link to comment
Share on other sites

in column A the old names

in column B put the new names

and column F is the script, it just uses a simple formula to make up the script, select all the cells in column F press Ctrl+C for copy and then on the Autocad command line right click and choose paste. The example is only 8 names but shows the idea.

LayerChange.xls

Link to comment
Share on other sites

After some searching I did find a lisp routine that in my one and only test did work. It renamed all five layers in my drawing. I suppose if you use a script and call the lisp routine it would be possible to batch process all 130 drawings.

Link to comment
Share on other sites

After some searching I did find a lisp routine that in my one and only test did work. It renamed all five layers in my drawing. I suppose if you use a script and call the lisp routine it would be possible to batch process all 130 drawings.

 

 

Yes. If I can rename automatically all of my current layers with the same names as the requested layers ,than I can use "LAYTRANS" and everything will happen in no time

 

can you show me an example of the lisp routine

Link to comment
Share on other sites

Show it to you? I can do better than that; I can upload a copy. Hold on....I'll be back.8)

 

The lisp routine, LayerRename.lsp, has been attached below. I assume you know how to load lisp routines right?

 

I suggest you run a test first. Create a new drawing with five layers named Layer1 thru Layer5. Load the routine and run it. Verify it works.

 

LayerRename.lsp

Link to comment
Share on other sites

thank you very much ReMark ,it is working perfect. :D I've just made the dance of happiness and now half of the office thinks that I'm high or something :P

 

You are saving me hours of work. 10x :notworthy: :notworthy: :notworthy:

Link to comment
Share on other sites

You're entirely welcomed Rubbersnow. I'm glad to hear the lisp routine has helped to solve your problem. You might give some thought to rkent's suggestion re: the Standards command. It could come in handy for addressing problems not addressed by the lisp routine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...