oldvba

oldvba

moloko291
Explorer Explorer
1,109 Views
3 Replies
Message 1 of 4

oldvba

moloko291
Explorer
Explorer

i have old vba from year  2006 and i think its 32 bit

now u have autocad 2018 64bit

how do i convert thos files to 64 bit that can run?

0 Likes
1,110 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

It should automatically convert. A dvb is made up of two parts, the text code you see/write and compiled code. When the dvb loads, the ide reads the code and compiles it if necessary. First though, it binds the code to the current running instance of AutoCAD. Unless you are using special controls, it should work fine.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

moloko291
Explorer
Explorer

well it didnt compile

can i send you the files please?

0 Likes
Message 4 of 4

norman.yuan
Mentor
Mentor

As @Ed__Jobe said, the code itself would convert automatically (i.e. syntax-wise), it is not guaranteed that the code for 32-bit VBA would pass the compiling either because of being 64-bit VBA, or because of being in different computer.

 

If the code uses some components only available for 32-bit VBA (such as any controls which is not AutoCAD VBA built-in ones), most likely there is no 64-bit replacing counterparts, thus the code would not compile and would not work. You need to either re-write the code, or find replacing components (which would result in code re-write more or less anyway).

 

If the code uses some components which is not available in this newer computer, the code would also not compile (such as if the code has references to MS Excel type library, but the computer does not have Excel installed).

 

So, in either case, if the code does not compile, you can open "menu->tools->References...", and in the "References" dialog box, look for something flagged as "Missing...". Then decide what it is and what to do. If it is something missing and not replaceable (especially 32-bit specific controls), then you'll need to rewrite the code, or give it up and move on to newer/other technologies (Acad .NET API, LISP...).

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes