Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

if condition causes problem calling other lisp

2 REPLIES 2
Reply
Message 1 of 3
bart_van_tuyl
261 Views, 2 Replies

if condition causes problem calling other lisp

Hi,

 

I have a lisp which pendant on wether a linetype exists will automatically run or not. I thought that the rule was if a lisp is to call another lisp we do that as follows

(WOBEL)

 as aposed to when its called through the command line as follows

 

(defun C:WOBEL ()

 

however with this in mind the following will not work

 (if (null (tblsearch "ltype" "BOUWTEK-01"))  
  (WOBEL)
 )

	
(DEFUN WOBEL ()
(alert "this is where the relating command would be")
)

 so what have i done wrong?

2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: bart_van_tuyl

(DEFUN WOBEL ()
(alert "this is where the relating command would be")
)

 (if (null (tblsearch "ltype" "BOUWTEK-01"))  
  (WOBEL)
 )

 

You must ensure that "WOBEL" function is already loaded when you call it...

 

HTH

Henrique

 

EESignature

Message 3 of 3
Shneuph
in reply to: bart_van_tuyl

If you define the lisp using C:WOBEL (command) you would have to call it with (C:WOBEL).  If you don't use WOBEL as a command define it as Defun WOBEL ( / ...) (function) and call as (WOBEL).

 

Afralisp page that talks about defun

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost