Reputation: 25
This is driving me nuts because I did this successfully once, but can't remember how the heck I did it. I have a lisp routine that is already loaded. In fact, it's loaded at startup. All well and good. Now I want to make it so that I can type a command and have it call that lisp routine. I thought it was "Command Aliases" in the "Express Tools", but it can't be that for the simple reason that it doesn't list the LISP programs that I have loaded. Yet, I have another lisp routine that I can activate by typing a command in the command line, so like I said, I did this once successfully already, I just cannot for the life of me figure out how the heck I did it. I've tried going into CUI to do it, but I can't figure it out.
Please help.
Upvotes: 1
Views: 65
Reputation: 2877
There are two ways to achieve this.
c:
. So(defun myfunction ()
... ;stuff
)
becomes
(defun c:myfunction ()
... ;stuff
)
princ
to see the value)(myfunction "arg1" var2 3.0)
and your function will be called with a string argument "arg1"
, the contents of a saved variable var2
, and the real number 3.0
Upvotes: 0