Jump to content

How to laytrans multi cad file?


bienda

Recommended Posts

I have 5 layer in 100 cad file

So i use command "laytrans" to change this "5 layer" to 5 other layer

But i have to use command "laytrans" 100 times

 

How to i can use only one command?

 

Help me pleaseeeeee

Link to comment
Share on other sites

Sounds like a good job for using a script so that you can batch process the group of drawings.

 

You have two good options for writing a script.

 

1. Lee Mac's Script Writer. Find it here...http://lee-mac.com/scriptwriter.html

 

2. AutoDesk's own ScriptPro which can be found at the AutoDesk website. Follow this link...https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-customization-conversion-tools.html

 

A third option for writing a script is to use any ASCII text editor. Start with this link re: Command scripts. https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-LT/files/GUID-95BB6824-0700-4019-9672-E6B502659E9E-htm.html

Edited by ReMark
Link to comment
Share on other sites

Sounds like a good job for using a script so that you can batch process the group of drawings.

 

You have two good options for writing a script.

 

1. Lee Mac's Script Writer. Find it here...http://lee-mac.com/scriptwriter.html

 

2. AutoDesk's own ScriptPro which can be found at the AutoDesk website. Follow this link...https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-customization-conversion-tools.html

 

A third option for writing a script is to use any ASCII text editor.

 

What, no mention of the Action Recorder?

Probably the most intuitive solution?

Link to comment
Share on other sites

What, no mention of the Action Recorder?

Probably the most intuitive solution?

 

I was thinking more along the lines of "hands off" batch processing but I suppose the Action Recorder could be incorporated into the script.

Link to comment
Share on other sites

If you have already set up the LAYTRANS mapping for those 5 layers, then do this.

Open the first of the drawings, then right click on your mouse, and from the right click shortcut menu, select ACTION RECORDER> RECORD.

Then enter LAYTRANS at the commandline, at which point the LAYTRANS dialog will open.

If you have already set up the mapping you want to use, then just select it, and hit TRANSLATE.

If you haven't already mapped the Layer Translations, then you will need to do it, and SAVE it, then select it and run it.

Follow the commandline prompts carefully.

Once you are through running the LAYTRANS command, Zoom Extents, and SAVE.

Then right click and select ACTION RECORDER > STOP.

Keep reading the prompts, as you want to name the ActionRecorderMacro you have just created.

The name cannot contain any spaces, make it a name that makes sense.

Close the drawing, and open the next one, then in the right click shortcut menu select ACTION RECORDER > PLAY, and select the action macro you just created.

Personally I would open 20 or 30 dwgs at a time, and in that way it is quite simple to cycle through them.

Not as wuick as a lisp or using a script, but easier to explain, and it will still save you lots of time.

The Action Recorder is a very helpful tool for those who are programming challenged, as it is basically just a keystroke recorder.

Do it once, tell it to remember what you wnt to do, not so difficult.

Edited by Dadgad
Link to comment
Share on other sites

I was thinking more along the lines of "hands off" batch processing but I suppose the Action Recorder could be incorporated into the script.

 

I hear you, but perhaps that is a bit of a stretch this time around, and given the op's experience level. :beer:

 

Certainly good skills to have, but if it is only 100 dwgs, they could be done in 10 to 15 minutes this way, otherwise the learning curve could stretch into hours or days. :|

Link to comment
Share on other sites

At which scale the need for a more erudite batch approach becomes well worth the time invested in the instruction.

 

The Action Recorder is largely under appreciated, and highly accessible, even to entry level users. :beer:

Not as good as lisp, but pretty drop dead simple.

Link to comment
Share on other sites

You can mix and match Lisp and scripts

 


eg 
open dwg1 (load "fixup") close Y
open dwg2 (load "fixup") close Y

the lisp "fixup" would contain the zoom e, purge and the laytrans process

 

If your dwgs are in say 1-3 directories it should take 2-3 minutes to create the script. Definately look at the script writers posted above. I use some old fashioned DOS tricks and word.

 

PS for future reference "how to change multiple cad files". Multicad maybe cad software.

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...