Monday, November 20, 2006

A little LISP to tie things together: Part 1


What? LISP!?!? You have to be kidding me! Ok, nope, not kidding. Sometimes, LISP still comes in handy when deploying your applications. Seriously! Especially if you are going to try and get your project done really quick. Rapid application development? Anyone?

Ok, here is a good example. You need to fire off a command at the startup of AutoCAD. What do you do? Sure you can program an initialize function in your .NET DLL, but we are talking about LISP here.

Try this:



(defun-q Autorun()
(command "mycommand")
(princ)
)
(setq S::STARTUP (append S::STARTUP Autorun))



It will have you firing commands at startup in just a few lines of code! Ok, now you need to deploy this to another machine. Hmm... Sounds like a job for NSIS, and another post.

No comments: