Visual Basic Customization

Reply
Distinguished Contributor
Posts: 117
Registered: ‎05-10-2009
Message 1 of 24 (1,428 Views)
Accepted Solution

VBA on AutoCAD 2012 64 bit?

1428 Views, 23 Replies
01-23-2012 06:24 AM

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,
*Expert Elite*
Alfred.NESWADBA
Posts: 8,445
Registered: ‎06-29-2007
Message 2 of 24 (1,425 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 06:49 AM in reply to: muckmailer

Hi,

 

>> Is there a fast solution to this problem

Without seeing what you code is? :smileywink: 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
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Posts: 117
Registered: ‎05-10-2009
Message 3 of 24 (1,424 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 07:09 AM in reply to: muckmailer

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, 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,445
Registered: ‎06-29-2007
Message 4 of 24 (1,421 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 07:30 AM in reply to: muckmailer

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<<< :smileywink:

 

>> 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
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Posts: 117
Registered: ‎05-10-2009
Message 5 of 24 (1,419 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 07:52 AM in reply to: muckmailer

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. 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,445
Registered: ‎06-29-2007
Message 6 of 24 (1,417 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 07:56 AM in reply to: muckmailer

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
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Posts: 117
Registered: ‎05-10-2009
Message 7 of 24 (1,413 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 08:39 AM in reply to: Alfred.NESWADBA

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,

*Expert Elite*
Alfred.NESWADBA
Posts: 8,445
Registered: ‎06-29-2007
Message 8 of 24 (1,411 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 08:56 AM in reply to: muckmailer

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
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Posts: 117
Registered: ‎05-10-2009
Message 9 of 24 (1,404 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 09:15 AM in reply to: Alfred.NESWADBA

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,

*Expert Elite*
Alfred.NESWADBA
Posts: 8,445
Registered: ‎06-29-2007
Message 10 of 24 (1,402 Views)

Re: VBA on AutoCAD 2012 64 bit?

01-23-2012 09:21 AM in reply to: muckmailer

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
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community