Author Topic: Force Run Routine on LISP Load  (Read 1771 times)

0 Members and 1 Guest are viewing this topic.

mailmaverick

  • Bull Frog
  • Posts: 493
Force Run Routine on LISP Load
« on: April 25, 2015, 09:43:42 AM »
Why doesn't the function run on loading the LISP file :-

Code: [Select]
(defun c:test()
(alert "Function Run")
) ; end defun

(eval (read "TEST"))

I have tried :-

(eval (read "TEST"))
(command "TEST")
(TEST)

but to no avail.

« Last Edit: April 25, 2015, 09:47:01 AM by mailmaverick »

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Force Run Routine on LISP Load
« Reply #1 on: April 25, 2015, 09:52:20 AM »
(c:test)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

mailmaverick

  • Bull Frog
  • Posts: 493
Re: Force Run Routine on LISP Load
« Reply #2 on: April 25, 2015, 10:03:29 AM »
Thanks for instant reply.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Force Run Routine on LISP Load
« Reply #3 on: April 25, 2015, 10:04:41 AM »
In before "that's wut she said".

And you're welcome. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ChrisCarlson

  • Guest
Re: Force Run Routine on LISP Load
« Reply #4 on: April 27, 2015, 07:07:50 AM »
If you want to run it on load from within a lisp routine

Code: [Select]
(defun c:test()
(alert "Function Run")
) ; end defun

(test)