Writing Simple Scripts in AutoCAD

kick it on CadKicks.com

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.

Download a Simple Script…

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 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.

are very powerful, especially since you can use them with code. Experiment with them. Start simple and build from there. I use complex almost on a daily basis.

Have a good weekend!

Share and Enjoy:
  • Digg
  • Technorati
  • LinkedIn
  • Facebook
  • del.icio.us
  • TwitThis
  • StumbleUpon
  • Live
  • Google

No Comment

No comments yet

Leave a reply