Check license at appload in lisp

Check license at appload in lisp

divymital
Enthusiast Enthusiast
1,307 Views
2 Replies
Message 1 of 3

Check license at appload in lisp

divymital
Enthusiast
Enthusiast

Hi,

 

I want to have license check  in my lisp/fas files right after appload command. If check fails lisp shall not be reading functions. This can be achieved in Object ARX in IExtensionApplication.Initialize method.Is there any way to have such a check in lisp during appload so that it exits the lisp and does not read lisp functions.

 

Please suggest. Thanks !

0 Likes
Accepted solutions (1)
1,308 Views
2 Replies
Replies (2)
Message 2 of 3

divymital
Enthusiast
Enthusiast

I am looking for a way to run a lisp function automatically to check some configuration/validations right after appload command and loading the lisp file in autocad. Please suggest.

 

0 Likes
Message 3 of 3

pbejse
Mentor
Mentor
Accepted solution

@divymital wrote:

I am looking for a way to run a lisp function automatically to check some configuration/validations right after appload command and loading the lisp file in autocad. Please suggest.

 


 

Embed the validation code on the lisp itself.

 

(cond
  (	(your validation thingy)	);<-- should result to nil to continue
  ( 	(and
	  (Validated..)
	  (Defun c:mycommand ()
	  	(princ "blah blah")
	  	(princ)))		)	
  (   	(princ "\nInvalid")		)
)
(princ)
   
   
  

HTH