VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2014, VBA, and MS Access 2013

2 REPLIES 2
Reply
Message 1 of 3
Robplatt
2503 Views, 2 Replies

AutoCAD 2014, VBA, and MS Access 2013

Good morning experts!

Picking up on the on going discussion re VBA 7 and AutoCAD 2014, I'm having issues with links between AutoCAD 2014 and MS Access 2013.

These links worked fine in my previous configuration (AutoCAD 2013 and Access 2010 - AutoCAD was 64bit and Access was 32 bit, and I was using VBA 6)

Can anyone tell me if this is simply an issue relating to 32bit VBA vs 64bit VBA 7, or are there changes in the way MS Access works as well.

More significantly can the issue be fixed, or does this mean I'm going to have to bite the bullet and change to VB.net?

Many thanks in advance.

Robert

2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: Robplatt

What is the "link between" AutoCAD and MS Access DB you mentioned? Yes, it is very likely because of the 32-bit and 64-bit issue.

 

Prior to AutoCAD 2014, even the AutoCAD itself is 64-bit, its VBA is still 32-bit. So, if your "link" means connection to Access DB created in VBA by your VBA code, then, yes, you can connect to 32-bit Access DB with AutoCAD VBA, (but 64-bit AutoCAD itself cannot directly connect to 32-bit Access DB with DataLink).

 

With AutoCAD 2014, if you use 64-bit AutoCAD, the VBA is now also 64-bit, therefore, if you want to connect with VBA code, the Access DB must also be 64-bit.

 

Depending on the complexity of your VBA project, moving current 32-bit VBA code into 64-bit VBA may or may not be an easy/straigntforward thing to do. And yes, migrating to .NET API might be better option in long term. In the between, moving data to a server type of DB, rather than use file based DB, such as Access DB might solve your immediate 32/64-bit issue with minimum code change (also depending on how you did the code of data access).

 

Message 3 of 3
Robplatt
in reply to: norman.yuan

Hi Norman, and thanks for the quick and comprehensive reply.
I am using VBA to insert and populate blocks in a drawing, and then I use the VBA to extract attribute data from the blocks into an Access database. I can then interrogate the drawing using the database data. The VBA programme is also set up so that I can make changes in the drawing and update the database all from within AutoCAD.
Ideally I'd obviously like to hang onto all the code I've written, mainly because it does exactly what I need it to do.
Thanks again.
Robert

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost