Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Trying to translate Ockendo's VLAX class under VB.NET
Trying to translate Ockendo's VLAX class under VB.NET
Hello,
I'm trying to translate the old but usefull VLAX class for VB.NET.
The VLAX class is usefull to use lisp code with VBA.
so as well as VB.Net allow the use of .Net commands under lisp,
making lisp command callable by .NET is very interresting.
In the begenning, i've tryed to convert VLAX original using interrop.
Without any success.
Then i've found a japanese version, but unfortunaly wrote with c# :
http://www1.harenet.ne.jp/~hanafusa/mt/memo/archives/000236.html
Here my project, with 2 ways of exploration :
http://www.g-eaux.com/pages_perso/VLAX.zip
any help appreciated, as i know i will never succeed alone.
hallex a écrit :
> Converted with help of: http://converter.telerik.com/
Thanks,
i've tryed also that translation, but it still not work.
her my adaptation, that loads, but make an error :
'#region Using directives
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Collections
Imports System.Reflection
I don't understand why someone would want to use this
to call LISP from VB.NET, when VB.NET and the managed
ObjectARX API gives them everything that LISP has, and
much, much more.
If you have existing VBA code that calls LISP, then my
advice is to start learning the managed ObjectARX API
and as soon as you can, migrate your code to use that,
rather than rely on LISP.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
"gégématic <-remove-it-gegematic@g-eaux.com>"
<=?UTF-8?Q?g=C3=A9g=C3=A9matic_<-remove-it-gegematic@g-eaux.com>?=> wrote in
message news:6332791@discussion.autodesk.com...
hallex a écrit :
> Converted with help of: http://converter.telerik.com/
Thanks,
i've tryed also that translation, but it still not work.
her my adaptation, that loads, but make an error :
'#region Using directives
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Collections
Imports System.Reflection
Tony Tanzillo a écrit :
> I don't understand why someone would want to use this
> to call LISP from VB.NET, when VB.NET and the managed
> ObjectARX API gives them everything that LISP has, and
> much, much more.
>
> If you have existing VBA code that calls LISP, then my
> advice is to start learning the managed ObjectARX API
> and as soon as you can, migrate your code to use that,
> rather than rely on LISP.
>
Hello Tony,
and thanks for your so many years help ! (i must have read your
publications since 1997...)
In the past, i've tryed to learn VBA.
even if i succeded in building few functions, i've never feel as easy
with vba than with lisp.
much of my code is single use : I've a problem for processing many
entity, drawing, i must program to do the stuff, and that's all.
Lisp is very interresting for that kind of approach : my programs are
scratch
i don't spend much of my time programming, i do much drawing or land
survey, so i prefer very simples languages.
In the past have used VBA for the lacks of lisp : forms, somes events,
file handling ...
Now i need to do the same with .net, but my developpement will be faster
if i can re-use my lisp routine in VB.net,
especially when using .Net to make forms interface.
VLAX.cls was very usefull for me, so if i can go on like that, it's better.
But i've also tryed to generate assembly from the C# source, i've the
same problem.
that kind of program is to complicated for my poor knowledge.
Before VBA was introduced into AutoCAD I used to use DCL to create simple dialogs for my LISP routines. When VBA was introduced I moved completely away from LISP. If I still wanted to code in LISP I would look at http://www.objectdcl.com or http://opendcl.com.
NathTay a écrit :
> Before VBA was introduced into AutoCAD I used to use DCL to create simple dialogs for my LISP routines. When VBA was introduced I moved completely away from LISP. If I still wanted to code in LISP I would look at http://www.objectdcl.com or http://opendcl.com.
>
Hi,
i experienced some problems of stability with Odcl in the past,
and i dislike to use thirdparty arx in my projects, because i've seen
many arx based project left,
(like doslib) and you can't make work your application when Autodesk
change his version.
definitly, for me, the good solution is something like VLAX class.
I don't know what is wrong, but i think i 'll find the way to make it
work ...
Thanks for your suggestion,
Gégé
Tony Tanzillo a écrit :
> I don't understand why someone would want to use this
> to call LISP from VB.NET, when VB.NET and the managed
> ObjectARX API gives them everything that LISP has, and
> much, much more.
>
> If you have existing VBA code that calls LISP, then my
> advice is to start learning the managed ObjectARX API
> and as soon as you can, migrate your code to use that,
> rather than rely on LISP.
>
>
I 've found an other way, and it funny that it was your solution ...
It works fine, but it generate an error that display a message box :
************** Texte de l'exception **************
System.EntryPointNotFoundException: Impossible de trouver le point
d'entrée '?acedEvaluateLisp@@YAHPB_WAAPAUresbuf@@@Z' dans la DLL 'acad.exe'.
à Rivilis.CSharpToLisp.acedEvaluateLisp(String lispLine, IntPtr& result)
à Rivilis.CSharpToLisp.AcadEvalLisp(String arg) dans
C:\Users\Gerald\Documents\Visual Studio
2008\Projects\VLAX-C\VLAX-C\CodeFile2.cs:ligne 52
à Rivilis.CSharpToLisp.test() dans C:\Users\Gerald\Documents\Visual
Studio 2008\Projects\VLAX-C\VLAX-C\CodeFile2.cs:ligne 94
à Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi,
Object commandObject, Boolean bLispFunction)
à
Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo
mi, Object commandObject, Boolean bLispFunction)
à Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()
With the help of Alexander Rivilis, and french programmer Gile,
here a version that work fine, with A64 or 32 :
Even if it seems that the result of a lisp routine cannot be passed to
.net if its a string, or a list.
but .Net let a list or a string assigned to a lisp var, and is able to
read a lisp var containning a string or a list.
So, for the use i've (create forms interface for lisp), it's enough.
//
// Only for AutoCAD 2007+
// This class is using undocumented function acedEvaluateLisp
//
using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;
using System.Runtime.InteropServices;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
NathTay a écrit :
> Before VBA was introduced into AutoCAD I used to use DCL to create simple dialogs for my LISP routines. When VBA was introduced I moved completely away from LISP. If I still wanted to code in LISP I would look at http://www.objectdcl.com or http://opendcl.com.
>
Hi,
i experienced some problems of stability with Odcl in the past,
and i dislike to use thirdparty arx in my projects, because i've seen
many arx based project left,
(like doslib) and you can't make work your application when Autodesk
change his version.
definitly, for me, the good solution is something like VLAX class.
I don't know what is wrong, but i think i 'll find the way to make it
work ...
Thanks for your suggestion,
Gégé
Tony Tanzillo a écrit :
> I don't understand why someone would want to use this
> to call LISP from VB.NET, when VB.NET and the managed
> ObjectARX API gives them everything that LISP has, and
> much, much more.
>
> If you have existing VBA code that calls LISP, then my
> advice is to start learning the managed ObjectARX API
> and as soon as you can, migrate your code to use that,
> rather than rely on LISP.
>
Hello Tony,
and thanks for your so many years help ! (i must have read your
publications since 1997...)
In the past, i've tryed to learn VBA.
even if i succeded in building few functions, i've never feel as easy
with vba than with lisp.
much of my code is single use : I've a problem for processing many
entity, drawing, i must program to do the stuff, and that's all.
Lisp is very interresting for that kind of approach : my programs are
scratch
i don't spend much of my time programming, i do much drawing or land
survey, so i prefer very simples languages.
In the past have used VBA for the lacks of lisp : forms, somes events,
file handling ...
Now i need to do the same with .net, but my developpement will be faster
if i can re-use my lisp routine in VB.net,
especially when using .Net to make forms interface.
VLAX.cls was very usefull for me, so if i can go on like that, it's better.
But i've also tryed to generate assembly from the C# source, i've the
same problem.
that kind of program is to complicated for my poor knowledge.
I don't understand why someone would want to use this
to call LISP from VB.NET, when VB.NET and the managed
ObjectARX API gives them everything that LISP has, and
much, much more.
If you have existing VBA code that calls LISP, then my
advice is to start learning the managed ObjectARX API
and as soon as you can, migrate your code to use that,
rather than rely on LISP.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
"gégématic <-remove-it-gegematic@g-eaux.com>"
<=?UTF-8?Q?g=C3=A9g=C3=A9matic_<-remove-it-gegematic@g-eaux.com>?=> wrote in
message news:6332791@discussion.autodesk.com...
hallex a écrit :
> Converted with help of: http://converter.telerik.com/
Thanks,
i've tryed also that translation, but it still not work.
her my adaptation, that loads, but make an error :
'#region Using directives
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Collections
Imports System.Reflection
hallex a écrit :
> Converted with help of: http://converter.telerik.com/
Thanks,
i've tryed also that translation, but it still not work.
her my adaptation, that loads, but make an error :
'#region Using directives
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Collections
Imports System.Reflection