Author Topic: About to Update AutoCAD from 2004 to 2012. API Issues????  (Read 6391 times)

0 Members and 1 Guest are viewing this topic.

ChuckHardin

  • Guest
About to Update AutoCAD from 2004 to 2012. API Issues????
« on: December 01, 2011, 05:54:53 PM »
I have novels of code written in VBA and VB6 for AutoCAD 2004.
Does anyone know of issues running that code in newer versions of vanilla CAD.
I also use the dockable container object.

We are needing to upgrade to use multiple core processors.
Also possibly a 64b OS.


BlackBox

  • King Gator
  • Posts: 3770
Re: About to Update AutoCAD from 2004 to 2012. API Issues????
« Reply #1 on: December 01, 2011, 06:16:21 PM »
Given that VBA was dying when I started to learn to code, I focused on Visual LISP and am jumping into .NET - So I cannot answer the specifics, per-se.

However, I can tell you that Autodesk stopped shipping the VBAIDE with AutoCAD for the past couple / few version, so you will require the VBA Enabler be installed for your version. Also, there are documented steps for porting your VBA code to VB.NET, I believe there's even a Magic Macro that automates some of this.

This thread may also be of use: VBA in 2011
... Scratch that; I was thinking of another thread.

HTH
"How we think determines what we do, and what we do determines what we get."

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: About to Update AutoCAD from 2004 to 2012. API Issues????
« Reply #2 on: December 01, 2011, 06:36:22 PM »
Start looking at porting your work to dotNET *now* rather than later (should have started a couple of years back, actually, but if you only have 2004 not much you could have done).  Serious speed issues have been reported with VBA under 64-bit.

And, for what its worth, AutoCAD still doesn't do much of any multi-threaded processing.  Its pretty much limited to regen/redraw, and any multi-threading from the user-side can't involve anything AutoCAD.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: About to Update AutoCAD from 2004 to 2012. API Issues????
« Reply #3 on: December 02, 2011, 07:51:01 AM »
I have novels of code written in VBA and VB6 for AutoCAD 2004.
I'm sorry to hear that.  :wink:

Does anyone know of issues running that code in newer versions of vanilla CAD.
Yup.  Most of it probably won't work.  If it does, it'll be slow.

Also possibly a 64b OS.
You're screwed.



I'm going through the same thing right now, sans dockable container.  The majority of our VBA apps don't work on 64-bit AutoCAD 2011 on Win 7.  It's sort of painful at times, but given the fact that we're doing most of our work in Revit these days it's not TOO bad.  We just need to finish out the AutoCAD jobs.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

ChuckHardin

  • Guest
Re: About to Update AutoCAD from 2004 to 2012. API Issues????
« Reply #4 on: December 02, 2011, 06:44:27 PM »
Thanks guys I was afraid of that.
 :cry:

A lot of the stuff I wrote was from 1998 to 2002 then fixed for AutoCAD 2004

I have custom GIS overlays that turn AutoCAD into a true GIS for Electrical distribution utilities.
Automated Meter Reading system integration
Goggle Map integration
Outage Management System
Automated Vehicle Location
most with near real time updates
and tons of little macros for playing with databases in AutoCAD

BlackBox

  • King Gator
  • Posts: 3770
Re: About to Update AutoCAD from 2004 to 2012. API Issues????
« Reply #5 on: December 02, 2011, 08:06:04 PM »
That's interesting... I've just started working to incorporate the Google Maps JavaScript API V3, with Adobe Flash SDK into a Window Presentation Foundation (WPF) User Control which will be hosted inside of an AutoCAD Tool Palette... Haven't gotten very far (yet) thanks to my having to work in Microstation for a project and maybe more. *sigh*

Oh well... I (mistakenly?) thought I was smart in skipping VBA and jumping from Visual LISP into .NET... But now with this Microstation crap, I guess I'm going to get that chance afterall. LoL V8i is only 5-10 years behind AutoCAD... What's the worst that could happen! LoL
"How we think determines what we do, and what we do determines what we get."