Exchange Forum > AutoCAD General
How to run .lsp
How to run .lsp

#1

CAD Guy
Join Date:
05-30-2008
Not sure how to load the .lsp games. Any help would be great.
 
Thanks,
 
Wanna be CAD Guy
How to run .lsp

#2

Flynn
Join Date:
07-24-2007
OK, this one's right up my alley. For starters whatever the name of the lsp file is, let's say TTD.lsp that's my cool Tic-Tac-Dummy game. I'm very proud of it because it's my first and only lsp program that I've written.
 
OK, first you need to copy the lsp file to a folder that's in your AutoCAD search path. If you need to add a path for your own stuff, go to the Options dialog and select the Files tab and look into your current Support File Search Path folders and add it there, like some folder on your C: drive.
 
OK, then you need to load the lsp file. So on the command line type this, (load "TTD.lsp"). That loads it. 9 times out of 10 the programmer will name the lsp file after the command name to run the program. With my TTD.lsp program all you need to do to run my cool game is type TTD and you're playing some cool stuff. I know man! I'm not very modest.
 
OK, now the 1 out of 10 cases where the programmer did not name the lsp file the same name that runs the program, or if there are several programs within the same lsp file, you're going to have to actually look at all that scary AutoLISP code using Notepad or some other text editor. Look for lines starting with "(defun c:". The name after the "(defun c:" is the name of the program that you can just type on the command line. If the line starts with "(defun" without the "c:" it's one of those weird AutoLISP functions that only programmers know how to use. So forget them. That's about all I know about loading lsp files.
 
How am I doing Hal?
How to run .lsp

#3

HAL
Join Date:
07-23-2007
B r e a t h e   d e e p . . .
How to run .lsp

#4

JPS
Join Date:
10-06-2007
OMG... Hal?   Hal... this guy needs a raise!!!
How to run .lsp

#5

HAL
Join Date:
07-23-2007
How about if we sell T-shirts and I cut him in for a percent of the extra-small sizes sold?
How to run .lsp

#6

Cadeaux
Join Date:
08-21-2007
I'll order 2 x-smalls if it helps.
 
No, go ahead and make that 3.
How to run .lsp

#7

Flynn
Join Date:
07-24-2007
Quote:
How about if we sell T-shirts and I cut him in for a percent of the extra-small sizes sold?
 
While I'm sleeping your guys are scheming again.
That's not even fair!
 
OK I'm in, if I get to design the T-shirts.
OK!
How to run .lsp

#8

CAD Guy
Join Date:
05-30-2008
Flynn - Thank you for the instructions, everything worked good. I was able to open other files but when it came to yours I got an error.
 
Now pick the upper right corner. [error: no function definition: DTR]
How to run .lsp

#9

Flynn
Join Date:
07-24-2007
No function definition? I though I put that in there.
Anyway here's a good copy with a bunch of improvements.
Have fun with it.
Flynn

Attachments  ttd.lsp