I've developed 3rd party software for AutoCAD and its verticals using Visual Lisp and ActiveX for a long time. In the past few months, I've decided to finally get serious about learning C#.net. Now that I've gained a comfortable level of confidence creating small applications in C#, I've decided to begin translating my VL application to C# for the following reasons:
-Increase programming power and flexibility
-Enable standalone development outside of AutoCAD
-Increase the longevity of my application if COM ever goes away.
My application is currently in use by quite a few engineers in the southwest United States, Mexico and India, so while I'm translating the app' I also have to ensure that the Visual Lisp and C# components can coexist peacefully. I send out updates every few months and I don't want to create any interruption to my clients. Therefore, what I need to learn to do is allow C#.net and Visual Lisp to communicate with each other.
I need to be able to make a Visual Lisp function call a c#.net method with parameters and make the C# method return calculation results to the Visual Lisp function that called it. Once I've learned how to do this effectively, I'll be well on my to a complete translation of my application over time. The first application feature I translated from Visual Lisp to C#.net had to output its results to the registry, where it was subsequently read by other Visual Lisp functions for further processing. I don't feel this is the most effective way of passing data back and forth between the two languages and I'm hoping there is a way to send and receive data DIRECTLY between the languages.
Can anyone help with this general concept? Some example code would be GREATLY APPRECIATED!
Thanks in advance
AutoCAD® .NET: Using .NET With Your LISP Applications
Event Year: Autodesk University 2009
Class ID: CP214-4
Wayne Brill
http://au.autodesk.com/?nd=class&session_id=5045
The video demonstrates VB but the concepts are consistant for C#
C# samples available.
Probably best to download the Screencast.
You'll need to sign in to the Autodesk University site
The same as my answer to your post at theSwamp
// Called Kerry in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect.
class keyThumper<T> : Lazy<T>; another Swamper
Kerry,
Thank you VERY much for your reply to my post. I ereally appreciate your time and help.
Regards,
-Nick Merchant