Yes, you can load Script files in AutoCAD to automate your commands.
You need to write script file in Notepad which can store text in ASCII format.
A script file executes a sequence of commands .
File fomat: .scr
How to write a Script file?
To write as Script file from Scratch Open ‘notepad’ in windows OS.
You need to write commands , values or options in notepad that you generally type in Command line of AutoCAD.
You may copy command history into Notepad but you need to remove instructions and Options part from it.
Lets say for example we want to write a script file which can draw Rectangle of in GA>
My Command line history will be:
RECTANGLE Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: 0,0 Specify other corner point or [Area/Dimensions/Rotation]: @297,210
Now
Copy command history and edit it as below,
RECTANGLE 0,0 @297,210
Now while saving text file do ‘Save As…’add extension to file name as ‘A_Rectangle.scr’. Save as type is ‘All Files’.
and save file on desktop or any location you want.
How to Load Script file ?
To load script file created above .
Start AutoCAD application , if AutoCAD is already open then make sure there are no objects present in model so you can see rectangle created after load script.
In ‘Drafting & Annotation’ Workspace Go to Manage>Applications > click on ‘Run Script’.
or
you can run command SCRIPT.
And select file ‘A_Rectangle.scr’ and click open , A Rectangle will create in Drawing Area with first corner point 0,0 and other corner point 297,210.
You can play with Scripts and create bunch of sample script files and use it as per your work to automate repetitive commands .
Tip: Script files won’t run on Dialog boxes so keep dialog boxes off by using command: FILEDIA and set value to ‘0’
thanks for the article sir,
it is very usefull