Author Topic: Get and Set Lisp Variables VBA to VB .NET  (Read 3228 times)

0 Members and 1 Guest are viewing this topic.

FELIX

  • Bull Frog
  • Posts: 242
Get and Set Lisp Variables VBA to VB .NET
« on: January 21, 2012, 02:43:24 PM »
I have functions VBA for GET and SET Lisp variables. How modify for VB .NET


Code - vb.net: [Select]
  1. Function GetLispVariable(ByVal varname AsString) AsObject
  2. Dim VL AsObject
  3. If VL IsNothingThen
  4.    VL = CreateObject("VL.APPLICATION.16")
  5. EndIf
  6. With VL.ActiveDocument.Functions
  7.    GetLispVariable = .Item("eval").funcall(.Item("read").funcall(varname))
  8. EndWith
  9. EndFunction
  10.  
  11. Sub SetLispVariable(ByVal varname AsString, ByVal value AsObject)
  12. Dim VL AsObject
  13. If VL IsNothingThen
  14.    VL = CreateObject("VL.APPLICATION.16")
  15. EndIf
  16. With VL.ActiveDocument.Functions
  17.    .Item("set").funcall .Item("read").funcall(varname), value
  18. EndWith
  19. EndSub
  20.  
  21.  
  22. 'PARA SETAR ==> SetLispVariable "nomevar", "Funciona!!"
  23.  
  24. 'PARA PEGAR ==> MsgBox ReadLispVariable("nomevar")
  25.  
  26.  
  27.  
OK.

kaefer

  • Guest
Re: Get and Set Lisp Variables VBA to VB .NET
« Reply #1 on: January 21, 2012, 02:55:40 PM »
I have functions VBA for GET and SET Lisp variables. How modify for VB .NET

Did you read the thread list before posting here?
Did you not see Getting and Putting Lisp Variables from .NET, which is as of now the second after your's?
If you did see Kerry's code, what aspect of it needs elucidation?

FELIX

  • Bull Frog
  • Posts: 242
Re: Get and Set Lisp Variables VBA to VB .NET
« Reply #2 on: January 21, 2012, 04:47:30 PM »
Yes of course I saw the other topic, but the program is too long and my functions are concise. You know VB.NET? Can you help me?

I converted to VB.NET.
I need one more help, I am not expert in VB.NET, use only for display screens for Autolisp because the DCL is very rigid.

OK?
OK.