Author Topic: Help/Hints needed migrating apps to multiple AutoCAD applications  (Read 1821 times)

0 Members and 1 Guest are viewing this topic.

ReneRam

  • Guest
Hello to everybody,
I have been asked to migrate some of my old applications, written for AutoCAD 2008, to different platforms of the company. At the time when I wrote the code, we had only Windows XP 32 bit, now I should upgrade everything to Windows 7 32 and 64 bit environments, and the code is intended to run inside AutoCAD 2011/2012, Map 3D 2011/2012 and Civil 3D 2012.
The applications made only use of the two *mgd.dll's and two of the ADN utilities, plus some lisp.
I have taken a look at http://www.theswamp.org/index.php?topic=30539.0 and http://through-the-interface.typepad.com/through_the_interface/2009/09/offsetinxref-septembers-adn-plugin-of-the-month-now-live-on-autodesk-labs.html but still I have some questions before diving in the re-factoring:
Assuming that at the moment my developing machines are at 32 bit with Visual Studio 2005,2008 and 2010...

  • Is it mandatory to move the developing environment to a 64 bit platform or can I just use my actual computer and test the dlls in the destination machines?
  • Which Visual Studio is better, since I'm targetting the default Net framework?
  • How do I include in the code the reference to both 32 and 64 bit *mgd.dll?

Finally, all the old code made use of modal forms, but I was thinking of moving the UI to Docking Palettes, that I think are modless containers, so I actually don't have full controll of what the user is doing.

Thanks in advance for any help

René

sinc

  • Guest
Re: Help/Hints needed migrating apps to multiple AutoCAD applications
« Reply #1 on: May 17, 2011, 12:12:08 PM »
You don't reference "both 32 and 64 bit *mgd.dll"...  .NET is independent of system architecture, and the same managed DLL works for both 32-bit and 64-bit.

In general, you can also compile your code to a single DLL that will work on both 32-bit and 64-bit.  In practice, there are caveats to this, especially with apps like Civil 3D, where not everything is accessible from the managed DLLs.

I've used VS 2008 to compile DLLs for C3D 2012.  I'm not sure if you can use VS2005 or not, but I don't know why you would want to.  Given a choice, VS 2010 is probably the one to use.  There are some caveats involved, especially with regard to target frameworks and debugging, but those issues have been covered here already.