Jump to content

VBA routing working on 65 bit AutoCAD 2014??


muck

Recommended Posts

In the past I have had trouble with my VBA routines working on 64 bit AutoCAD 2012 & 2013.

I had all kinds of problems. Now I am on a machine that has AutoCAD 2014 on it.

To my surprise I noticed that one of my VBA routines that failed on AutoCAD 2012 and 2013 is

working on AutoCAD 2014.

The machine that has AutoCAD 2014 on it is a Windows 7 64 bit machine but I don't know

if AutoCAD 2014 is 64 bit or not. Is there a way to tell if I am using AutoCAD 2014 64 bit?

Maybe AutoCAD was installed in compatable mode and it is not really 64 bit.

 

Maybe AutoDesk made fixes to 64 bit AutoCAD 2014 VBA. I need to know why my VBA routine

is working on the AutoCAD 2014 machine and not with my AutoCAD 2013 machine. Maybe there

is a way to fix the 2013 machine to allow VBA routines to work properly.

 

Can anyone help?

Thank you,

Edited by muck
Link to comment
Share on other sites

In AutoCAD 2012 and 2013 the VBA engine is the 32 bit VB6.3 and in AutoCAD 2014 it is the 64 bit VB7 engine. 32 bit controls used in VB6 will not work in VB7.

 

For the VBA routines that are not working in VB6 try opening the module in VBAIDE and check the references, if there are any marked "MISSING..." then remove the tick from the box and try running it again. Alternatively post your code here so we can have a look at it.

Link to comment
Share on other sites

Here is a snap shot of my VBA References for AutoCAD 2013 and there is only 3 boxes checked.

It does not work. I have almost given up on using VBA on it.

 

I do will look at the 2014 machine and give you a snap shot of it at a later time.

ScreenShot008.jpg

Link to comment
Share on other sites

In your VBAIDE you do not have any project loaded and hence you will only get the three boxes you showed. If you load a project and then check your references you will get extra boxes checked. The following screen shot shows the references for a forms application in AutoCAD 2013, note that it references the 'AutoCAD 2012 Type Library' even though it is 2013. The 'Microsoft Forms 2.0 Object Library' reference is automatically inserted as soon as you insert a form into your project. The 'Microsoft Common Dialog Control 6.0 (SP6)' reference is automatically inserted when you place a common dialog control onto your form, note that this is a 32 bit control and not available the 64 bit VB7 VBA engine used in 2014.

 

Loaded-References.jpg

 

Ignore the fact that the dialog is in German, I don't have an English version of 2013 to show you. There isn't a Language Pack for Civil 3D 2013 and earlier, just for vanilla AutoCAD.

Link to comment
Share on other sites

Ok here is my ref snap shot on the 2013 AutoCAD.

I cannot enter text into the text boxes with my routine.

 

Remember that this same routine worked on 2014 AutoCAD

and other autoCAD versions below 2012.

ScreenShot008WithProject.jpg

Link to comment
Share on other sites

Your Type Library is at the bottom of your list, increase it's priority using the up arrow in the dialog. You can only move it up to position 2, 'Visual Basic for Applications' is in position 1 by default. See if that changes any thing.

Link to comment
Share on other sites

Tyke,

 

The 2014 machine VBA is 7.1 and my routine it appears to to do fine on it.

Note I have only ran the routine a few times for testing but it appears to be working

on 2014.

I don't know why is it not working on 2013 & 2012 machines

Thank you,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...