VBA on AutoCAD 2012 64 bit?

VBA on AutoCAD 2012 64 bit?

muckmailer
Collaborator Collaborator
7,629 Views
23 Replies
Message 1 of 24

VBA on AutoCAD 2012 64 bit?

muckmailer
Collaborator
Collaborator

VBA on AutoCAD 2012 64 bit?

I have recently upgraded form AutoCAD 2010 to AutoCAD 2012 (64 bit). I am using the 64 bit AutoCAD enabler. I noticed that my VBA routines on this new will not run properly. Text Field that I typed data into will not allow me to enter data. Is there a fast solution to this problem that does not envolve recoding? Thank you,
0 Likes
Accepted solutions (1)
7,630 Views
23 Replies
Replies (23)
Message 2 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> Is there a fast solution to this problem

Without seeing what you code is? 😉 That's nothing more than guessing to what you might have used to get your program running.

 

So I start guessing: difference between ObjectID and ObjectID32

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 24

muckmailer
Collaborator
Collaborator

I can create a new program and put a form w/new textbox in it and it will not allow me to add text to the new

textbox. I have not added any code. Maybe it is a default setting in the textbox properties??

Any Suggestions?

Thank you, 

0 Likes
Message 4 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> put a form w/new textbox in it

OK, now we know you are speaking about a "field in a form" and not about the AutoCAD type >>>field<<< 😉

 

>> I have not added any code

I have added code, because I load the form object, look to the attached sample. _VBARUN and start "showForm"

I can write a string into the TextBox by code and also by hand after the form is activated. Tested with AutoCAD 2012 SP1

 

- alfred -

 

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 24

muckmailer
Collaborator
Collaborator

My version I cant change the field by hand?  It comes in by code but can't be changed by hand.

Say I want to change it to Drawing3.dwg to Drawing4.dwg after the program is running with the textbox

showing. I can't do it with my version of 2012.

Any suggestions. 

0 Likes
Message 6 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

have you started the macro with command _VBARUN or did you start out of the IDE using the "play"-button?

Try first if you have not yet, because the second item (starting with "play"-button) is not a problem from your textbox, it's a generic focus-problem between AutoCAD, VBA-32bit-server and VBA-IDE.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 7 of 24

muckmailer
Collaborator
Collaborator

I usually load my programs with Vbaman then use Run Sub or Userform in the pull down

menu in the IDE. Where is the Play Button in the IDE?

 

Maybe there is a problem here but it allways work with AutoCAD 2010 VBA?

 

 

Thank you,

0 Likes
Message 8 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> Where is the Play Button in the IDE?

Look at the screenshot, and if you don't see this toolbar then it's just switched off.

Anyway, with 64bit I won't use it ("play") because of focus-problems!

 

 

 

>> Maybe there is a problem here but it allways work with AutoCAD 2010 VBA?

Where you on 64bit with 2010 also?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 9 of 24

muckmailer
Collaborator
Collaborator

I think my 2010 stuff was 32 bit but my little textbox test program was created with the

AutoCAD 2012 64bit IDE. I would think that program would allow me to enter text in the

textbox when I ran it?

 

 

I see the play button on my 2012 64bit IDE.

So don't use the play button indicated in the previous message?

So with this 2012 64 bit how do I start a program.

 

 

Thank you,

0 Likes
Message 10 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> So with this 2012 64 bit how do I start a program.

Look to my previously attached DVB (within the ZIP) and start is with command _VBARUN

 

>> was 32 bit

And that makes big differences, especially the performance breakdown with 64bit.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 11 of 24

muckmailer
Collaborator
Collaborator

If I click about in the VBA IDE I get

Ms Basic 6.3 (1987-2001) 

Version 1053.

Is that correct?

Thank you,

0 Likes
Message 12 of 24

Alfred.NESWADBA
Consultant
Consultant

Great,

 

I see on the top half:

Microsoft Visual Basic 6.0

Copyright (c) 1987-1999 Microsoft Corp.

 

But the last line (right-aligned) in this dialog shows:

VBA: Retaul 6.3.8863   Forms3:  14.0.6009.100

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 13 of 24

muckmailer
Collaborator
Collaborator

So where do I begin to figure out this.

Are other people have this problem.

Thank you,

 

0 Likes
Message 14 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> So where do I begin to figure out this.

  • verify you have installed SP1 for AutoCAD
  • if you have more than one pc with AutoCAD installed, try it also on the other pc
  • if no other pc is available try to login with another user-name to your Windows and start AutoCAD with this account
  • try to start AutoCAD with the option "start as administrator"

That's my ideas for the moment.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 15 of 24

muckmailer
Collaborator
Collaborator

How do you verify that has sp1 installed???

If SP1 is not installed I can get the network administrator to install it.

I do not see that in the "About" pull down menu?

I am on  a network version and I have limited PC access.

Please Advise.

Thank you,  

0 Likes
Message 16 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> How do you verify that has sp1 installed???

a few days ago, look to >>>this thread<<<

 

>> I am on  a network version and I have limited PC access.

So you will need the admin to install the SP1 for you ... AND I would ask him to set admin-rights for your account and then try your VBA problem having then no security limitations (at least for a trial period).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 17 of 24

muckmailer
Collaborator
Collaborator

Well I see where SP1 is installed.

So what is the next step?

Thank you,

0 Likes
Message 18 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> So what is the next step?

  • if you have more than one pc with AutoCAD installed, try it also on the other pc
  • if no other pc is available try to login with another user-name to your Windows and start AutoCAD with this account
  • try to start AutoCAD with the option "start as administrator"

😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 19 of 24

muckmailer
Collaborator
Collaborator

I have mouse control in the textboxes. I can place my mouse pointer at

different locations in the textbox field but I can't type any new text in the textboxes.

Please advise?

Thank you,

0 Likes
Message 20 of 24

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

create event handlers for this textbox (I think you are working now with my sample), as much as possible, do a call msgbox in them and look what events get fired.

BTW have you tried all with another user-name and/or as admin? That could give us some info's to isolate your prob faster.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes