Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

TheCADnoob
en respuesta a: Zesty46

Edit: I started this before the question got answered haha, figured id share anyway. 

 

Scripts are easy generally. Dont get me wrong, there are lots of ways they go sideways but basically you just write each command on a new line in a text file. 

 

TheCADnoob_0-1694013834630.png

 

TheCADnoob_1-1694013950699.png

 

next rename your .txt file to a .scr file. Be sure that you are changing the file extension and not just adding a .scr to the file name. if you cant see the file extensions, turn those on

 

One way you can tell if you have created a script file is if the icon has changed. 

TheCADnoob_2-1694013981243.png

 

What goes into your script file is basically just the command you would send to the command line. So if you wanted to start a line command you would put line in your script file. The other key aspect is that to simulate pressing the enter key is done by going to the next line. 

 

Now specific to your task you will likely need to toggle off the save file dialog. That can be done by changing the FILEDIA system variable to 0. This will allow your save commands to be run from the command line. 

 

Once that is set then use the save as command and then select the DWG version you would like. When it prompts for the file name just do an enter (go to the next line). 

 

Once you are don remember to reset your filedia back to 1. 

 

Here is the contect of a script fil that will save the current file to dwg:

 

FILEDIA
0
SAVEAS
LT2018

FILEDIA
1

 

 

One thing that is always a little tricky is the next line/ enter thing. Some time you may have too many enters which cause command to run again, or some times you forget to do a new line which doesn't finish the command like you though it would. 

 

Hope all that helps!

CADnoob

EESignature