.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get and Set Lisp Variables VBA to VB .NET

4 REPLIES 4
Reply
Message 1 of 5
FELIXJMELO
1450 Views, 4 Replies

Get and Set Lisp Variables VBA to VB .NET

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
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: FELIXJMELO

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.
Message 3 of 5
FELIXJMELO
in reply to: FELIXJMELO

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.
Message 4 of 5

{code}
Autodesk.AutoCAD.ApplicationServices.Application.GetInterfaceObject("VL.Application.16")
{code}
http://discussion.autodesk.com/forums/thread.jspa?threadID=761657
 
Message 5 of 5
FELIXJMELO
in reply to: FELIXJMELO

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

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

Thankfull!

FELIX-BRAZIL.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost