TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
When replying to a specific statement be sure to quote the previous post.

VBA in v19
Read 3010 times
* April 20, 2012, 09:12:26 AM
I am a long time user of TC (since v2!), and have a lot of essential VBA macros I've written which function fine in v14, provided that an older version which bundled VBA (in my case v9) is also installed.

Will this work with v19? I'd like to remove v14 (and v9 also if it were possible!)

Logged


* April 20, 2012, 12:28:03 PM
#1
Hi Ian
your solution did only work till version 15.
In TC19, especially 64 bit Version, no vba-macro will work.

I used the old vba within TC a lot till version 15. Then I switched to VB6. With little or no change  I create .exe with my old macro-code. The .exe are more slowly then vba within TC. But it is working in 32bit, in TC16,17,18 and TC19 (32-bit).
In TC19-64bit it don´t work.

Bernd


Logged


* April 20, 2012, 02:23:28 PM
#2
Thanks Bernd - Oh dear  >:(

I actually bought a copy of VB6 years ago specifically to try and integrate my VBA macros properly into TC's Toolbars and Menus, after reading some info from Tom Snape (where's he now??) - but ultimately gave up! I think the most tedious issue was creating the Menu items and Buttons. I thought it would be nearly as easy as MS Office - until I moved from Office 2003 to 2007!  :o But that's another sad story.....

So just how hard is it to port a VBA macro to VB6? Is there a tutorial somewhere? I'm surprised it runs slower, I always imagined an EXE or DLL would be far quicker.

I'm running 64-bit W7 - how would 32-bit TC run on it? Would I only want the 64-bit version if I wanted to throw a lot of RAM at it?

Thanks

Ian

Logged


* April 20, 2012, 02:33:53 PM
#3
BTW after reading one of your posts, I think it's relevant that I have VB6 Pro....

Logged


* April 21, 2012, 12:08:13 AM
#4
Hi Ian
I am facing currently the same problem.
When you want to start your macros within TC, or in other words , creating a .dll, there is no chance using VB6 with TC19-64. VB6 need the  reference to Imsigx19.dll (which is a 64-bit .dll in TC19-64 bit). That is not possible.

>>So just how hard is it to port a VBA macro to VB6? Is there a tutorial somewhere? <<
to create an .exe is very easy. copy the code, reference in VB6 - that’s it.
to create the .dll is more complicate.

>>I'm surprised it runs slower, I always imagined an EXE or DLL would be far quicker.<<
I compare the speed with the vba-ide within TC, which was cancelled in TC12.
the .exe run much slower then vba macro within TC.
the .dll is almost the same speed.

I decide to stay longer with TC18. But in the long run I need a solution for 64-bit. I installed VS-2010 express , with is free. But non of the samples provided from IMSIdesign (in the SDK folder) work with TC19-64 bit.
I asked IMSI for support http://forums.turbocad.com/index.php/topic,8840.0.html

>> Would I only want the 64-bit version if I wanted to throw a lot of RAM at it?<<
sure 64-bit. To use more RAM is the reason for 64-bit.

best regards
Bernd
« Last Edit: April 21, 2012, 12:22:39 AM by ibruethsch »

Logged


* April 22, 2012, 08:16:52 AM
#5
Hi Ian
I wrote: >>When you want to start your macros within TC, or in other words , creating a .dll, there is no chance using VB6 with TC19-64. VB6 need the  reference to Imsigx19.dll (which is a 64-bit .dll in TC19-64 bit). That is not possible.<<

The patch (20.4 to 26.1) brought some improvements:
Now my old 32-bit .dll still work in TC19-64 bit.
But the data obviously go some deviations - I think thru WOW64, but don´t no excactly.
That means they become very slowly. (In TC19-32bit = 5 sec in TC19-64bit ~80 sec)
Not really good, but better than nothing.

>>So just how hard is it to port a VBA macro to VB6? Is there a tutorial somewhere?<<
Yes
David Bell
http://www.bcitool.com/TCDRC/Tutorials/Using%20Forms%20with%20TurboCAD%20DLLs.pdf
and
http://www3.turbocadcommunity.com/tiki-index.php?page=VB6+Tool+Step+By+Step

Bernd

Logged