For those of you who are new to writing scripts in AutoCAD, I have included a simple script as an example to show you how it works.
This script creates a “Circle” layer, sets it current, and prompts the user to draw a circle.
You will notice that in the beginning of the script, commands are written just as if they were being typed into the command line. At the end of the scipt I included very simple AutoLISP code that starts the CIRCLE command and pauses twice for user input (two clicks for center and radius of a circle).
To run this script, type SCRIPT on the command line and browse to open the “circle.scr” file. Once you click the Open button the script will run immediately.
Scripts are very powerful, especially since you can use them with AutoLISP code. Experiment with them. Start simple and build from there. I use complex scripts almost on a daily basis.
Have a good weekend!