CAD Forums > New to CAD
Scr files.
nyah:
Hi Everyone
Big yellow thing in the sky we are all hiding here in Scotland, someone told us its called "Sun"
That said.
Is there a resource or book I can bu that teaches me how to write script files?
I have 200 drawings that have the same lines and text on the same layers and wouyld love to be able to change the layers automatically ideally from outside the drawing failing that a universal command that changes the old layers to the corresponding new layers, which too dont change
Grateful for anyones help
Thanks
Nyah
M@yhem:
Have a look....
http://www.theswamp.org/index.php?topic=18781.msg230055#msg230055
http://www.theswamp.org/index.php?topic=26572.0
http://thecadgeek.com/blog/2008/03/introduction-to-autocad-script-files/
http://www.upfrontezine.com/tailor/tailor19.htm
Lee Mac:
One more...
http://lee-mac.com/scriptwriting.html
Andy Hudson:
this will do it.
--- Code: ---;;rename layers;;
-layer
rename
old-layer-name
new-layer-name
;;end of script;;
--- End code ---
Scripts are easy, just write down the commands you'd use in Autocad to do the job, then add them to a text file, save it as a scr file and your off and running.
BIGAL:
Some more help stuff that is definately not documented
1st Start Run CMD got to directory with drawings do dir *.dwg >dirlist /b
this makes a txt file of all your drawings names.
2nd open txt in word and simply make your script, a real smart feature is you can search/replace end of line its ^p
you add 1 blank line at top for changes at start of lines eg ^p open, for ends just put in commands and then add ^p eg close N ^p
2nd-2 use excel paste txt file then add text columns use the contactenate command to make new single line scripts and cut and paste out.
Navigation
[0] Message Index
[#] Next page
Go to full version