Author Topic: VBA Compatibility between Acad versions  (Read 1988 times)

0 Members and 1 Guest are viewing this topic.

solo

  • Guest
VBA Compatibility between Acad versions
« on: September 13, 2007, 12:51:38 PM »
Hi everyone,

I have created a VBA procedure that does 'stuff' in Acad2000 just fine.  The problem is that it doesn't do 'stuff' when executed in Acad2007 Mechanical.  Does anyone know why this might be?  Should the code execute exactly the same between versions?  I can't debug the code with Acad2007 Mech because i don't have it.  I wrote the code in Acad2000 and am distributing it remotely to a client who is using Acad2007 Mech.

The code analyzes polyline info.  I know in Acad2000 the .objectname is 'AcDbPolyline' and in Acad2007 Mech it is 'AcDb2dPolyline'.  Even if i account for this difference the code still does not do 'stuff'.

Any help will be greatly appreciated.

Thanks,
solo

Guest

  • Guest
Re: VBA Compatibility between Acad versions
« Reply #1 on: September 13, 2007, 12:57:33 PM »
I'm not surprised it doesn't work.  2000 to Mechanical 2007 is a BIG jump and quite a bit has changed.

solo

  • Guest
Re: VBA Compatibility between Acad versions
« Reply #2 on: September 13, 2007, 03:01:00 PM »
Thanks Matt.

That's kind of what i was thinking.  So i guess i have to keep up to date with Acad and create code that checks the version and responds accordingly.  Seems like a pain in the butt.

Thanks again for the help,
Solo

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: VBA Compatibility between Acad versions
« Reply #3 on: September 13, 2007, 04:22:29 PM »
It may be the type libraries are not being updated.

If you write code in 2000, and reference the AutoCAD 2000 type library, it might be looking for the AutoCAD 200o type library and not updating to the correct one. i.e. AutoCAD 2007.

I can check the code on AutoCAD 2007 if you like, but you will need to pm me for an email address to send it to.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Bryco

  • Water Moccasin
  • Posts: 1882
Re: VBA Compatibility between Acad versions
« Reply #4 on: September 13, 2007, 09:40:04 PM »
Quote
Acad2000 the .objectname is 'AcDbPolyline' and in Acad2007 Mech it is 'AcDb2dPolyline'
no it's still 'AcDbPolyline'
ditto what Keith said.