OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: khann on September 29, 2010, 05:58:00 PM

Title: How can I know whether ODCL Runtime is installed or not ?
Post by: khann on September 29, 2010, 05:58:00 PM
Hi,
When I published a lisp code of involving ODCL Form or Function ,
if he does not have ODCL Runtime the lisp code will fail.

At this time can I check the Runtime is installed or not before run the lisp code ?

Thanks.
Title: Re: How can I know whether ODCL Runtime is installed or not ?
Post by: Fred Tomke on September 30, 2010, 12:12:32 AM
Hi, I didn't test it yet, but I would give it a try:
(vl-cmdf ...) executs a command without cancelling the code in case of failing

Code (autolisp) Select
(if (and (not dcl_project_load)
(vl-cmdf "OPENDCL")
(not dcl_project_load))
  (alert "No OpenDCL is installed yet.")
); if


The more complicated way would be to research the registry.

Fred
Title: Re: How can I know whether ODCL Runtime is installed or not ?
Post by: khann on September 30, 2010, 01:10:29 AM
Thanks, Fred.

That's just it.  :D :D
Title: Re: How can I know whether ODCL Runtime is installed or not ?
Post by: owenwengerd on September 30, 2010, 06:55:08 AM
The ideal approach is to run the OpenDCL Runtime install as part of the installer for your own code, then there is no need to check for its presence.
Title: Re: How can I know whether ODCL Runtime is installed or not ?
Post by: khann on October 04, 2010, 09:05:34 PM
Yes, that's right.
I make some codes of install program, some codes of just ".lsp" file which has ODCL Function.
Install program has ODCL Runtime but the others not.

I don't know who will get my codes by chance and run on his machine after it's been published.
So I want to check the ODCL Runtime is installed or not and just alert him of ODCL presence if he has not ODCL Runtime.

Thanks, Owen.