Get and Set Lisp Variables VBA to VB .NET

Get and Set Lisp Variables VBA to VB .NET

FELIXJMELO
Contributor Contributor
1,861 Views
4 Replies
Message 1 of 5

Get and Set Lisp Variables VBA to VB .NET

FELIXJMELO
Contributor
Contributor
I have functions VBA for GET and SET Lisp variables. How modify for VB .NET


Function GetLispVar(ByVal varname As String) As Object
Dim VL As Object
VL = CreateObject("VL.APPLICATION.16") '{color:#ff0000}<<< VBA, <<< VB .NET ??????
{color} With VL.ActiveDocument.Functions
GetLispVar = .Item("eval").funcall(.Item("read").funcall(varname))
End With
End Function

Sub SetLispVar(ByVal varname As String, ByVal value As Object)
Dim VL As Object
VL = CreateObject("VL.APPLICATION.16") {color:#ff0000}'<<< VBA, <<< VB .NET ??????
{color} With VL.ActiveDocument.Functions
.Item("set").funcall(.Item("read").funcall(varname), value)
End With
End Sub

OK.

Thank you.

FELIXJM - BR
0 Likes
1,862 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hi, FELIXJMELO!

F> I have functions VBA for GET and SET Lisp variables. How modify for VB
F> .NET

Read this document: http://au.autodesk.com/?nd=material&session_material_id=5312

Best Regards,
Alexander Rivilis.
0 Likes
Message 3 of 5

FELIXJMELO
Contributor
Contributor
The one that I am needing is just to use VLLIB of AutoCAD and to modify the following line of VBA for VB .NET:

VBA code => VL = CreateObject("VL.APPLICATION.16")

VB .NET code => ……………………………………………

Thankful,

FELIX – BRAZIL.
0 Likes
Message 4 of 5

Anonymous
Not applicable
{code}
Autodesk.AutoCAD.ApplicationServices.Application.GetInterfaceObject("VL.Application.16")
{code}
http://discussion.autodesk.com/forums/thread.jspa?threadID=761657
0 Likes
Message 5 of 5

FELIXJMELO
Contributor
Contributor
Error: Object reference not set to an instance of an object.

VL = acadApp.GetInterfaceObject("VL.Application.16")

Thankfull!

FELIX-BRAZIL.
0 Likes