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

Need help loading a particular net assembly

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
e.g.
289 Views, 4 Replies

Need help loading a particular net assembly

Hello everybody,

 

I need a little bit of help because I don't know how to program in lisp. I have a master lisp routine that runs when Autocad is opening. I have some computers running Autocad 2010 and others with Autocad 2012 and from the master lisp routine (which is the same) I need to load a net assembly (one for Autocad 2010 or another for Autocad 2012).

 

I was thinking to query for Autocad version and if it is Autocad 2010, then load the first dll, or if it is Autocad 2012 then load the second dll, but I don't know how to do this in lisp.

 

Thank you very much for your help.

 

e.g.

4 REPLIES 4
Message 2 of 5
hmsilva
in reply to: e.g.

(if (Equal (getvar "ACADVER") "18.s (LMS Tech)" );AC2012
  (load "Ac2012xxxxx.dll")
    ); if not, do not do anything
(if (Equal (getvar "ACADVER") "18.0s (LMS Tech)" );AC2010
  (load "Ac2010xxxxx.dll")
    ); if not, do not do anything

 

Hope that helps

 

Henrique
 

EESignature

Message 3 of 5
e.g.
in reply to: hmsilva

Yes, thank you very much.

 

e.g.

Message 4 of 5
hmsilva
in reply to: e.g.

You're welcome, e. g.

 

EDITED

 

e. g. wrote:
...I need to load a net assembly..


Sorry, I have read too fast!!!

 

(if (and (Equal (getvar "ACADVER") "18.s (LMS Tech)") ;AC2012
	 (findfile "Ac2012xxxxx.dll")
    )
  (vl-cmdf "netload" "Ac2012xxxxx.dll")
); if not, do not do anything
(if (and (Equal (getvar "ACADVER") "18.0s (LMS Tech)") ;AC2010
	 (findfile "Ac2012xxxxx.dll")
    )
  (vl-cmdf "netload" "Ac2010xxxxx.dll")
); if not, do not do anything

 

Henrique

EESignature

Message 5 of 5
hmsilva
in reply to: e.g.

and a typo

 

where is "18.s (LMS Tech)"  should be "18.2s (LMS Tech)" for AC2012

 

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost