29 April 2012

What is AutoLISP? | What is the use of AutoLISP? | How to display alert in AutoLISP Simple Example for autoLISP | How to write small function AutoLISP.



AutoLISP:

  •  AutoLISP is a Lisp programming language.
  •  AutoLISP is using with the AutoCAD.
  • It is one of the Application Programming interface(API) built into AUTOCAD.
  • Neither the Application Programming interface nor the interpreter to execute AutoLISP code is included in the AutoCAD LT product line.
  • AutoLISP code can interact with the user through the AutoCAD graphical editor by the use of functions.
  •  AutoLISP can display dialog boxes through the Dialog Control Language(DCL).
  • AutoLISP is AutoCAD's inbuilt programming language.
  • AutoLISP is used to create programs that will automatically generate drawings. This is a procedural programming language.
  • It is inbuilt i.e. if you have AutoCAD full version loaded on your computer then AutoLISP is already there. AutoCAD LT version do not have AutoLISP interface. 

  
Let us know about how AutoLISP will work.
Open AutoCAD --- click on Tools --- click on AutoLISP----click on Visual LISP Editor 


Then the editor will open like below.

Lets we write the small function to show the alert box.
(defun c:alert()
  (alert "Hi Welcome to Autolisp-Roja ")
  )
Save the file as alert.LSP

In the c:alert  c shows the main function in this file.
Goto AutoCAD.in the command  prompt write the following.
Command: (load “alert”) 
Press ENTER.
This shows that load the alert.LSP file.
Type Alert and press ENTER the output like the below figure.

 Happy reading.........

No comments:

Post a Comment