bienda Posted August 9, 2016 Share Posted August 9, 2016 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 Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 9, 2016 Share Posted August 9, 2016 (edited) 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 August 9, 2016 by ReMark Quote Link to comment Share on other sites More sharing options...
bienda Posted August 9, 2016 Author Share Posted August 9, 2016 Sounds like a good job for using a script so that you can batch process the group of drawings. Please tell me how to do it? Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 9, 2016 Share Posted August 9, 2016 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? Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 9, 2016 Share Posted August 9, 2016 Please tell me how to do it? See my previous post for links. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 9, 2016 Share Posted August 9, 2016 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. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 9, 2016 Share Posted August 9, 2016 (edited) 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 August 9, 2016 by Dadgad Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 9, 2016 Share Posted August 9, 2016 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. 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. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 9, 2016 Share Posted August 9, 2016 By the time we're done that 100 drawings will probably be upped to 1000. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 9, 2016 Share Posted August 9, 2016 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. Not as good as lisp, but pretty drop dead simple. Quote Link to comment Share on other sites More sharing options...
bienda Posted August 9, 2016 Author Share Posted August 9, 2016 hix, but i explode, erase, xref and purge before laytrans, so i think that i need use my hand. LOL. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 17, 2016 Share Posted August 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.