Mastering AutoLISP in 80 Minutes Instructor: Lynn Allen Course Summary: AutoLISP has been around for a long time and has always separated the AutoCAD green thumbs from the gurus. This course begins by debunking some popular rumors and explores the amount of AutoLISP code used in CAD-dependent industries today. AutoLISP is more powerful, it’s free and it provides users with the ability to create new AutoCAD commands in minutes. This class helps seasoned AutoCAD users enter the world of customization and programming using AutoCAD's native graphical language. The class is designed for intermediate-level AutoCAD users who have never programmed in AutoLISP before.
52
Embed
Mastering AutoLISP in 80 Minutes Instructor: Lynn Allen Course Summary: AutoLISP has been around for a long time and has always separated the AutoCAD.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Mastering AutoLISP in 80 MinutesInstructor: Lynn Allen
Course Summary:AutoLISP has been around for a long time and has always separated the AutoCAD green thumbs from the gurus. This course begins by debunking some popular rumors and explores the amount of AutoLISP code used in CAD-dependent industries today. AutoLISP is more powerful, it’s free and it provides users with the ability to create new AutoCAD commands in minutes. This class helps seasoned AutoCAD users enter the world of customization and programming using AutoCAD's native graphical language. The class is designed for intermediate-level AutoCAD users who have never programmed in AutoLISP before.
Objectives
• To lay a firm foundation of the basics of Visual Lisp.
• Prepare you to write your own Visual Lisp routines
• Start you down the path to official AutoCAD Gurudom ( or “Nerdom”)
• Teach you some quick and dirty basics of Visual Lisp (don’t look too close!).
• Discover new ways to torture your coworkers!
Hold on - we have a lot of information to cover in 80 minutes!
First and Foremost! Don’t let Visual Lisp intimidate
you!
What does LISP stand for?
LISt Processor(not Lost In Stupid
Parentheses!)
The Basics
• Lists• Functions• Arguments• Golden Rules of AutoLISP
What is a LIST?
Anything inside of parentheses
Examples of LISTS:(a b c)(setq x 1)(princ)
What is a FUNCTION?(or subr)
The ACTION you want Visual Lisp to do!
In Visual Lisp the function ALWAYS go first!!!
Visual Lisp uses Prefix notation
Example: (+ 1 2)(- 5 3)(inters A B C D)(setq x 3)
Visual Lisp as a CalculatorINFIX Notation(1 + 1)(3 * 4)(6 / 2)PREFIX Notation(+ 1 1)(* 3 4)(/ 6 2)
Arguments• Arguments are the values you pass to a
function(+ 5 6)+ is the function5 and 6 are the arguments
(setq x “Autodesk”)Setq is the functionX and “Autodesk” are the arguments
The Golden Rules of Visual Lisp
• For every open paren, you must have a closed paren
Example: (setq x (+ a b))• For every open double quote, you
must have a closed double quote. Example: (prompt “How are you?”)