Calling VB dll from Lisp

#1
Hi all,
How to call VB routine from LISP in IntelliCAD? For example in AutoCAd lisp I use:
(setq Test (vlax-create-object "DllName.clsClass"))
(setq answer(vlax-invoke-method Test 'SomeMethod))What alternatives are in IntelliCAD?
Thank for all sugestions.

------------------
Remyga, Lithuania

#3
Thanks John,
But I need to call from lisp vb function how can I do that (I need to bypass parameters to vb function and than get back some data with these parameters). Is this possible?

------------------
Remyga, Lithuania

#4
Remyga,

When you create a .dll or .exe in VB and these can be automatically loaded when ICAD starts.

Your VB programs are now commands in ICAD and can be called using the command function in Lisp. This takes care of the calling of the VB program.

As I understand you need to set some data in Lisp and then call the VB routine to modify the data and return this to the calling Lisp routine.

This is possible and the method depends on how much data and the type of data you are using.

As an example:
If the data is only a few strings or doubles you can use the USER system variables in ICAD to store and retrieve the data.

If there is a large quantity of data you can use ASCII files because both Lisp and VB can read/write to these files.

Also in ICAD you can read a Lisp variable or set a Lisp variable from VB using the GetLispVariable and SetLispVariable methods.



------------------
Regards
John Finlay

#5
Thanks John,
You see, I want to convert my routines to work with IntelliCad with little changes. (I have to support both Acad and InteliCad app's), but it seems to me that I wilol have a lot off work to do ...
You mentioned USER system variables, they dont fit my needs (data may be huge), txt file is a soliution, but I think a little bit "dirty" ...
I was trying to convert my VB (acad) to VB (IntelliCad), and mentioned that not all methods/collections that are in Acad are in Intellicad
Image
(. And I stuck there. Even i lisp there is a lot off missing functions
Image

For example: I need to iterate through all drawing lauyouts and to do some work with them, How can I achive this? In Acad VB there is Layouts collections and Layout object, in Lisp there is (layoutlist) function. So in IntelliCad I can't find any such function
Image

Thank you for your sugestions, your help is very good.
P.S. Maybe you know more livabile newsgroup/forum off IntelliCad, this forum seems to me allmost dead
Image
Maybe I'm wrong ...


------------------
Remyga, Lithuania

#6
Remyga,

As you mention there are more functions in ACAD than in ICAD.

Layouts were not in ICAD and have recently been introduced. There is a layout manager being developed and no doubt the code to drive it will become available.

ICAD is a low cost alternative and may not meet all expectations. It is under development and I believe it has the possibility to solve the majority of CAD users.

------------------
Regards
John Finlay