A. How to Create LISP file ? (File extension: .lsp )
- First of all Create a text file and save it as .lsp format (use Notepad++ to create LISP file and save as .lsp)
- Write alert code from Previous Chapter as (alert “This is my first alert Message.” “DraftSight alert” “INFORMATION”)
- Save file with name ‘startup.lsp‘ in of your computer (Lets say in D: drive > ‘LISP Files’ folder).
B. How to Load LISP file in DraftSight ?
Function to load LISP file is load
- To load above created LISP file in DraftSight write this following code in command line .
(load “D:\\LISP Files\\startup.lsp”)
- This code means Load startup.lsp file in folder LISP Files Located on D drive.
- Now, If Alert message pop up then we are doing Great!
Practice: Try with different location of LISP files .
Tip: You can drag and drop LISP file inside DraftSight GA .
C. Auto loading Lisp Files
- Use this method in order to automatically load above file when we open new or existing Drawing file in DraftSight.
- As you have Created startup.lsp file and saved on path D:\LISP Files , assign this path in Support file search path.
- Go to Tools > Options > File Locations > System > Expand section ‘Support Files Search Path’ , On righ side click on New tab and Browse and select folder D:\LISP Files (Move up this path) > Apply and Ok.
- Restart DraftSight or Open New file startup.lsp file will load automatically .
Next 3. LISP Arithmetic Functions