VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Initializing VBA System...Problem in loading DVB file

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
3660 Views, 7 Replies

Initializing VBA System...Problem in loading DVB file

At my work we are sometimes getting a similar error message when we start autocad 2009.

Initializing VBA System...Loading VBA startup file...; error: Automation Error. Problem in loading DVB file

However the problem is very random. One day it works for me and not for a few others then in a few weeks time someone else will have the problem. Sometimes if it is not working and you go out of AutoCAD during the day and go back in and it fixes itself but mostly not. The next day you come into work and it always works fine. (Is it network issues ?). I have tried rebooting and turning the machine off totally off with no result.

I have all my dvb files load from the acad.lsp file which sits on the network.

Sample code :

(setq NetPath "N:/Structural/Programs/")
(vl-vbaload (strcat NetPath "FILE.DVB"))

I have tried everything and searched everywhere for the answer. I am now going to try to put all the programs onto the local drive of a couple of the machines to see if this fixes it.

It is very frustrating. Any ideas anyone ?
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Hi,

Two items will help.

They are both based on the premise that you can only load a VBA program
from a networks file to somewhere about 15 computers.

1 Copy the VBA programs to a local drive with the Computer log-on script.

2 Get rid of the:

{code}

(vl-vbaload (strcat NetPath "FILE.DVB"))

{code}

It is totally useless, in fact worse, because it slows AutoCAD startup down by loading VBA code which may never be used in a drawing session and by forcing the load of a program contributes to the over use of the network based file.

When you want to run VBA code use lisp in this format:
{code}
(vl-vbarun (strcat NetPath "FILE.DVB!MacroName"))

{code}


If you don't want to copy locally, you could try using /"vbaunload" /in
your lisp script.//

////

//This would reduce the number of loaded versions of the file to the
number actually in use and could change the number of satisfied users
from 15 or so maximum to perhaps 500 maximum depending on time of
running and number of call to the program.//


Regards,


Laurie Comerford
ollie71 wrote:
> At my work we are sometimes getting a similar error message when we start autocad 2009.
>
> Initializing VBA System...Loading VBA startup file...; error: Automation Error. Problem in loading DVB file
>
> However the problem is very random. One day it works for me and not for a few others then in a few weeks time someone else will have the problem. Sometimes if it is not working and you go out of AutoCAD during the day and go back in and it fixes itself but mostly not. The next day you come into work and it always works fine. (Is it network issues ?). I have tried rebooting and turning the machine off totally off with no result.
>
> I have all my dvb files load from the acad.lsp file which sits on the network.
>
> Sample code :
>
> (setq NetPath "N:/Structural/Programs/")
> (vl-vbaload (strcat NetPath "FILE.DVB"))
>
> I have tried everything and searched everywhere for the answer. I am now going to try to put all the programs onto the local drive of a couple of the machines to see if this fixes it.
>
> It is very frustrating. Any ideas anyone ?
>
Message 3 of 8
Anonymous
in reply to: Anonymous

Thanks Laurie.

Where do you get the 15 max user figure from. I obviously have never heard of such a thing.

The pre-loading is not useless as it is a program that everyone uses all day every day. Therefore when they hit the button on the menu it will run instantly rather than waiting for it to load. I would prefer the waiting at autocad startup than when the program is required.

Do you see anyone from the old company ?

Do you have an email that I contact you directly on if that is ok? Edited by: ollie71 on Mar 10, 2010 10:43 PM
Message 4 of 8
Anonymous
in reply to: Anonymous

Hi,

The issue was discussed in the newsgroup many times several years ago.
I have no personal experience and cannot remember if any one ever posted
a specific number.


Regards,


Laurie Comerford

ollie71 wrote:
> Thanks Laurie.
>
> Where do you get the 15 max user figure from. I obviously have never heard of such a thing.
>
> The pre-loading is not useless as it is a program that everyone uses all day every day. Therefore when they hit the button on the menu it will run instantly rather than waiting for it to load. I would prefer the waiting at autocad startup than when the program is required.
>
> Do you see anyone from the old company ?
>
> Do you have an email that I contact you directly on if that is ok?
>
> Edited by: ollie71 on Mar 10, 2010 10:43 PM
>
Message 5 of 8
Anonymous
in reply to: Anonymous

On 3/10/2010 5:44 PM, ollie71 wrote:

> Where do you get the 15 max user figure from. I obviously have never
> heard of such a thing.

There was a problem that may have been fixed, a limit of 20 'ish.

Of course it won't matter soon, VBA is DEAD. They just haven't closed
the casket yet.

Terry
Message 6 of 8
dgorsman
in reply to: Anonymous

Depending on the size/complexity of the DVB, you won't see an impact in load times between load at start-up and load on function call. Given the computers AutoCAD is running on these days, small-medium DVBs will load virtually instantaneously (they should also be the easiest to convert to .NET). For you to see a load delay it would have to be HUGE. You won't necessarily need to unload it afterwards either, which will bypass loading it multiple times, but then you run into that max users number.

If the routine is that important, use it as a learning experience for upgrading to .NET or hire out to get it converted (make sure you get the source code back as well as the DLL). You will likely need to do this anyways in a couple of years.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 8
Anonymous
in reply to: Anonymous


wow, i want to know your secret!

🙂

vba has always had an obnoxiously slow wake up
period, no matter how small the program is,

granted it's only a few seconds, but compared to
lisp which IS instantaneous, even a trivial vb prog that has to load takes much
longer perceptually. say a half dozen modules and similar number of classes and
maybe a form or two.

 

I'm jealous if your vb loads and runs
instantaneously!

you're saying you can run from lisp (vla-runmacro
...) or (vl-vbarun ...) and it loads and runs instantaneously - like a lisp
command would?

 

🙂

mark


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Depending
on the size/complexity of the DVB, you won't see an impact in load times
between load at start-up and load on function call. Given the computers
AutoCAD is running on these days, small-medium DVBs will load virtually
instantaneously (they should also be the easiest to convert to .NET). For you
to see a load delay it would have to be HUGE. You won't necessarily need to
unload it afterwards either, which will bypass loading it multiple times, but
then you run into that max users number.

If the routine is that
important, use it as a learning experience for upgrading to .NET or hire out
to get it converted (make sure you get the source code back as well as the
DLL). You will likely need to do this anyways in a couple of
years.
Message 8 of 8
dgorsman
in reply to: Anonymous

I have tried to keep them small and self-contained (with the imminent demise of VBA I now keep them non-existent) so only those that are necessary need to be loaded. I also have the acvba.arx autoloading from the ACAD.RX file so its ready to go if necessary without the pause for that demand load. Must remember to remove that when we upgrade to 2011...
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report