AutoCAD scripts are purely a file with the commands that you would type if you were to do it manually.
When getting used to using scripts, run through the command in autocad, and write down what you type at the command line and when you press enter.
For your specific question, you will need to set FILEDIA to 0 at the start of the script to ensure that when dialogs would normally show you will get the command line option, then use the -attext command (again, for command line rather than dialog), and then set FILEDIA back to 1 at the end of your script.
It will be something along the lines of
Each line represents 1 entry to the command line, so using the FILEDIA as an example, in AutoCAD, you would type FILEDIA, then press enter (right-click, space bar, etc) and then type 1, and then press enter again. To represent this in the scr file, type FILEDIA, press enter to start a new line, type 1, then press enter to start a new line again.Code:FILEDIA 0 -attext C etc etc etc FILEDIA 1
If you use command where you would press enter without typing something, then do the same, just press enter in your script to leave a blank line.
Remember, the file format for scripts is SCR, so when you have completed the script in your text editor, remember to save with the correct file format.
Hope this gives you a bit of an insight into how they work.



Reply With Quote



Bookmarks