[racket] AutoCAD, AutoLISP, MzCOM and Racket

From: Tim Marchbank (tjm_22 at hotmail.com)
Date: Thu Jun 5 04:12:25 EDT 2014

Hi,

I have been programming in AutoLISP inside AutoCAD for a while now and also have done a bit of programming with Racket, including dialog boxes.
Recently I tried to use COM from inside Racket to run AutoCAD and got that to work.
However, now I am attempting to use Racket as a COM object (using MzCOM) from inside AutoCAD / AutoLISP to run Racket and I can’t seem to get passed the first hurdle – getting the MzCOM object.
(I can get COM application objects for Excel and Word working)
The aim was to call Racket to develop dialog boxes using components not readily available using AutoLISP’s inbuilt dialog control language (DCL).

Code inside AutoLISP:

(vl-load-com) ; initialises the visual-lisp COM extensions
(setq racketapp (vlax-get-or-create-object "MzCOM.MzObj.6.0.1")) ; should return the MzCOM object ?
(vlax-invoke-method racketapp 'Eval "(+ 1.2 3.4)")  ; doesn’t work so far as racketapp is nil

I’ve tried the latest version of Racket.
Also tried to re-register MzCOM as per the docs.

Just wondering if anyone else has tried to do it and found it to work or not.

Any suggestions are greatly appreciated...

Thanks in advance,


Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140605/326f60c3/attachment.html>

Posted on the users mailing list.