The AutoCAD Blog Posted June 8, 2021 Share Posted June 8, 2021 This month’s article for the Have You Tried series focuses on a productivity enhancing technique in AutoCAD: creating scripts. Scripts in AutoCAD can automate repetitive tasks and improving accuracy. Maybe you insert a title block and create several layers when creating a new drawing. A script can help automate that task. Instead of starting a command from the AutoCAD user interface and then providing a value or entering an option at the Command prompt, you type and store the command sequence in a plain text file using an application like Notepad. In this Have You Tried, we’ll go over how to: Create a script fileManage script filesRun a script file in a drawingRun a script from the ribbonRun a script file across multiple drawings using ScriptPro Learn how to create scripts to improve your productivity with the step-by-step examples in the Have You Tried: Streamline Tasks with Scripts topic. Keep the Feedback Coming Thanks for all the great feedback submitted so far. Because of the great feedback, we have been able to improve the topics in the AutoCAD Online Help system. The best way to submit feedback is by using the “Was this helpful?” section located at the bottom of every Help topic. Let us know what you like or don’t like about a topic or provide suggestions for other subjects that you’d like to see covered in greater detail. The more specific your comments, the better. The post Have You Tried: Streamline Tasks With Scripts in AutoCAD appeared first on AutoCAD Blog. http://feeds.feedburner.com/~r/autodesk/AutoCADBlog/~4/t8iJ1oKETwMView the full article Quote Link to comment Share on other sites More sharing options...
ammobake Posted June 9, 2021 Share Posted June 9, 2021 Cool! I've been googling whether or not it was possible to recover all previous commands from the command line so one could create a script based on the command history of an existing DWG/DWT file. (Autocad 20201) If you hit F2, you will see the full command line history in a drop down. You can then use "COPYHIST" command and paste everything into a text file. So if you were compelled to create a script to recreate a specific drawing or template you already have on file, one could use this process (fine tuning it to remove redundant commands if necessary). Although, depending on the complexity of your existing file, sifting through all that could be mind-numbing. But it would get your drawing up to speed to what you have in your other file(s) should it be needed. On a side note.. While poking around, I found a 7-lesson tutorial on VisualLISP that is built in to autocad. Never knew that was there. Ctrl+2, scroll down to "tutorial", expand, click Visual Lisp, you will see 7 lesson folders there. It turns out those files in the autocad folder are all part of the below tutorial that was originally implemented back in 2014 or so I guess (possibly earlier). It is called "Garden Path" https://help.autodesk.com/cloudhelp/2018/CHS/AutoCAD-AutoLISP-Tutorials/files/index.htm#! The below will bring up a series of links that will guide people through the tutorial. Thought I would share! -ChriS Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 9, 2021 Share Posted June 9, 2021 (edited) When was 20201 released they just keep making new ones The down the Garden path has been updated since the original. "Appendix E Tutorial" page 219 R12 Autolisp programmers manual May 1992. ps my bible. What about "Logfile" is that useful also. Edited June 9, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.