OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Emiliano on March 21, 2015, 03:33:49 AM

Title: Problem with (type dcl_getversionex)
Post by: Emiliano on March 21, 2015, 03:33:49 AM
Hello everyone,
to load my project use this function:

Code (autolisp) Select

(defun LoadRunTime ( / )
    ;; Demand load the OpenDCL.##.ARX. This requires the OpenDCL Runtime or Studio to be installed on each PC first.
    (cond
      ( (= 'EXRXSUBR (type dcl_getversionex)) )
      ( (= 2 (boole 1 (getvar "DEMANDLOAD") 2))
        (vl-cmdf "_OPENDCL")
        (if (/= 'EXRXSUBR (type dcl_getversionex))
          (progn
            (princ "\nThe OpenDCL Runtime module failed to load. Please repair the OpenDCL installation and try again.")
            ;(exit)
          )
        )
      )
      ( (progn
          (princ "\nThe OpenDCL Runtime module cannot be loaded because demand loading is disabled.\nLoad the OpenDCL ARX file manually, or enable demand loading for commands by setting the DEMANDLOAD system variable to 2 or 3.\nSee the \"ManualLoading.lsp\" sample for a demonstration.")
          ;(exit)
        )
      )
    )
)



Unfortunately, on some occasions (random), the error appears "\nThe OpenDCL Runtime module failed to load. Please repair the OpenDCL installation and try again.".
This happens because (type dcl_getversionex) = SUBR instead of EXRXSUBR

Even if this error appears, the form is loaded and working properly.

You have no idea why this happens?
Any advice?

Thanks in advance
Title: Re: Problem with (type dcl_getversionex)
Post by: roy_043 on March 22, 2015, 05:20:27 AM
You can avoid the issue by changing Line 4 to:
Code (autolisp) Select
( dcl_getversionex )

And changing Line 7 to:
Code (autolisp) Select
(if (not dcl_getversionex)
Title: Re: Problem with (type dcl_getversionex)
Post by: owenwengerd on March 22, 2015, 07:01:51 AM
I recommend to replace all of that with simply
Code (autolisp) Select
(command "_OPENDCL")