Tony, thanks for the suggestion.
It works so so, when used from AutoCAD commands, it works fine, but when used from my own routines, I get the message 'Can't reenter LISP". This is true both for LISP based functions and ObjectARX.
Finally, If I go down this route, I will not be able to use this in AutoCAD 2006. Do you know if there is a way to return a resbuf from a VB.NET function using ACAD 2006 ? Alternatively, skipping 2006 and doing it in 2007.
Below is the function I use to test the solutions:
_
Public Function VB2function(ByVal rbfArgs As ResultBuffer) As ResultBuffer
Dim rbfResult As ResultBuffer
rbfResult = New ResultBuffer( _
New TypedValue(CInt(5001), 3.14159), _
New TypedValue(CInt(5001), 0), _
New TypedValue(CInt(5001), 400.4))
Return rbfResult
End Function
Hmm, searched the forum on the can't reenter LISP function found some answers.
Obviously the system believes my .NET function is now a LISP function and thus will deny access if called from LISP.
This then rules out the option of using the LISPFunction keyword unless all old code migrated to .NET
Message was edited by: NilsL
Further investigations show that some of the old c++ objectARX code I have uses acedDefun and acedRegFunc. This obviously makes them lisp code in the same was as LispFunction does with vb.net code.
I did some modifications and removed the aceddefun, acedRegFunc, declared the function as an external function in .NET and called it. This made the function a .NET function and suddenly the transparent Lispfunction could be used.
Message was edited by: NilsL