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...; error: Automation Error. Problem in loading DVB

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
1329 Views, 3 Replies

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

Hi,

I've just constructed a little dialogue box using VAB. before we start lets not get into any suggestions of using OpenDCL as I have my reasons for that.

I based my customization upon the tutorials I found at the following link:

http://www.afralisp.net/vl/vl-vba1.htm

Works a treat, that is as long as I don't save the testdial.dvb and exit VBA, if I do that I only ever get the following message when I try and use my little compiled customization:

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

Surely someone out there knows why this is happening its driving me mad.

Thanks-
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

What version of AutoCAD? How are you invoking your command? Is your code
short enough to post? If so, please post it...

AutoCAD_Client wrote:
> Hi, I've just constructed a little dialogue box using VAB. before we start lets
> not get into any suggestions of using OpenDCL as I have my reasons for that. I
> based my customization upon the tutorials I found at the following link:
> http://www.afralisp.net/vl/vl-vba1.htm Works a treat, that is as long as I don't
> save the testdial.dvb and exit VBA, if I do that I only ever get the following
> message when I try and use my little compiled customization: Initializing VBA
> System...; error: Automation Error. Problem in loading DVB file Surely someone
> out there knows why this is happening its driving me mad. Thanks-
Message 3 of 4
Anonymous
in reply to: Anonymous

code, code, code. You gotta post the code. cant even start to guess what happened until you post the code.

But Id guess the problem is lisp related, and you've posted to the wrong group.

if it was vba, couldnt you just use "Msgbox Msg" ?
Message 4 of 4
Anonymous
in reply to: Anonymous

Oh yeh, code that might be useful,

;;===LISP CODE STARTS HERE===

(defun c:WSM ()

(vl-load-com)

(setq applic (vlax-get-acad-object))

(if (findfile "WSM.dvb")

(progn

(vl-vbaload "WSM.dvb")

(vla-eval applic "userform1.show")

(command "WSCURRENT" (getvar "users1"))

);progn

(alert "\nCannot find DVB file")

);if

(princ)

);defun

(princ)

;;===LISP CODE ENDS HERE===

What I have discovered since the last post is that we can fix/ patch the problem by amending the following lines.

(if (findfile "C:/TEST/WSM/WSM.dvb")

(vl-vbaload "C:/TEST/WSM/WSM.dvb")

And I did also create a search path within AutoCAD.

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

Post to forums  

Autodesk Design & Make Report

”Boost