If you already know AutoLISP, you may find my explanations a little simplistic, but I am trying to keep it as simple as I can for those that don’t, so please bear with me. However, I will explain those things that you need to know about AutoLISP in order to accomplish what we are trying to do. There are plenty of good books on the market that do that. If the code is then manually edited, the simulation will not be accurate. Instead, they use the same tool path drawing that was used to generate the CNC code. Many commercial programs will simulate the operation of the machine, but do not use the CNC code to do it.
#AUTOCAD LISP PROGRAMS HOW TO#
The last chapter, G-CODE TO DRAWING, will show you how to reverse the process and generate a drawing of the tool path from the CNC code. From there, you can add as many bells and whistles as you desire. This book will show you the basic principles to get you started. Perhaps you can not find a commercial program that does exactly what you want it to do, what your needs are don’t warrant the cost of a commercial program, you want more control of the CNC code, or you may just enjoy the challenge of doing it. There are many reasons why one might want to create his own programs to generate CNC code from tool paths drawn in AutoCAD.
No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.ĪutoCAD and AutoLISP are registered trademarks of Autodesk, Inc. The author makes no express or implied warranty of any kind and assumes no responsibility for errors or omissions. It is assumed, however, that the reader does know AutoCAD and G-code. The programming language used is AutoLISP, but the article assumes the reader knows nothing about AutoLISP (this could also be done with VBA or VSTA). This article presents the basics on producing G-code using nothing but AutoCAD and one of its built-in programming languages.
Don Jones has spent the past 20 years using and customizing AutoCAD in the stair manufacturing industry.