Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting dvb to dll

80 views
Skip to first unread message

Bill Schoenhut

unread,
May 30, 2003, 8:44:24 AM5/30/03
to
I know this was posted sometime ago but I can't find it. How do you convert
a .dvb file into a dll and then call it from AutoCAD vba?
Thanks,
Bill


R. Robert Bell

unread,
May 30, 2003, 9:47:52 AM5/30/03
to
You cannot *directly* compile a .dvb into a .dll. See our website for
details on what you want to do.


--
R. Robert Bell, MCSE
www.AcadX.com


"Bill Schoenhut" <Bill.Sc...@SpectraSiteBG.com> wrote in message
news:E270A850EE4CA703...@in.WebX.maYIadrTaRb...

Frank Oquendo

unread,
May 30, 2003, 9:52:42 AM5/30/03
to
Bill Schoenhut wrote:
> I know this was posted sometime ago but I can't find it. How do you convert
> a .dvb file into a dll and then call it from AutoCAD vba?

It won't be a straight port. You connect to AutoCAD in a different way
and there is no ThisDrawing object. Also, any forms in your DVB will
have to be completely rewritten.

Once compiled, you use the DLL just like any other library: reference
it, instantiate an object supplied by the DLL and manipulate the object
via its properties and methods.

--
"It is more important that you know how to find the answer than to have
the answer" - Me
http://code.acadx.com

Dale Levesque

unread,
May 30, 2003, 12:35:46 PM5/30/03
to
Frank,

Do you know of a comprehensive explanation anywhere re: the
benefits/penalties of doing this? In process servers, etc.? I'm not clear on
this subject and would like to figure it all out.

Dale

"Frank Oquendo" <fra...@acadx.com> wrote in message
news:E2E251ADC1678CE8...@in.WebX.maYIadrTaRb...

Dale Levesque

unread,
May 30, 2003, 1:43:47 PM5/30/03
to
After following the instructions for creating a DLL at
http://code.acadx.com/ (which is what I did), have your main function in
your class module accept the application object. Like this:

Public Sub g_sb_MySub(ao_AcadApp As AcadApplication)
Blah blah ...
End Sub

Then call it like this from your acad.dvb stub:

Public Sub g_sb_Stub()
Dim MyDLL As New clsDLL

MyDLL .g_sb_MySub ThisDrawing.Application
End Sub

The reason I put my large DVB file into a DLL was so that I could utilize
our versioning software on the project. It just wasn't possible when
everything was stored in a binary DVB file.

Dale


"Bill Schoenhut" <Bill.Sc...@SpectraSiteBG.com> wrote in message
news:E270A850EE4CA703...@in.WebX.maYIadrTaRb...

R. Robert Bell

unread,
May 30, 2003, 1:43:18 PM5/30/03
to
I haven't re-read our article in awhile, but it might explain the benefits.

http://code.acadx.com/articles/003.htm

--
R. Robert Bell, MCSE
www.AcadX.com


"Dale Levesque" <dale at dynamicwindows.com> wrote in message
news:530B17BFCB4DCB40...@in.WebX.maYIadrTaRb...

Frank Oquendo

unread,
May 30, 2003, 2:55:44 PM5/30/03
to
Dale Levesque wrote:

> Do you know of a comprehensive explanation anywhere re: the
> benefits/penalties of doing this? In process servers, etc.? I'm not clear on
> this subject and would like to figure it all out.

Every Windows applciation is a given its own 2GB memory segment. This is
called a process space. All process spaces are mapped into physical and
virtual memory so the same memory address in one space does not
correspond to the same physical address in another.

That means that when two applications want to share data, Windows has to
match up the addresses and shuttle the data across those process
boundaries. This is called marshalling and it's an expensive procedure.

However, an in-process server is an applciation which gets loaded into
the same process space as the calling application. Thanks to the fact
they share the process space, the in-process server ahs direct access to
the calling application's data alleviating the need to marshal that data.

The obvious benefit is speed as anyone who has ever used an ActiveX exe
as an AutoCAD controllers can tell you.

Dale Levesque

unread,
May 30, 2003, 2:54:10 PM5/30/03
to
Thanks! That must mean that a VBA app is in process as well?


"Frank Oquendo" <fra...@acadx.com> wrote in message

news:C6D48F8814FBD836...@in.WebX.maYIadrTaRb...

Frank Oquendo

unread,
May 30, 2003, 3:20:33 PM5/30/03
to
Dale Levesque wrote:

> Thanks! That must mean that a VBA app is in process as well?

You're welcome. And yes, it is.

Bill Schoenhut

unread,
Jun 2, 2003, 4:37:45 PM6/2/03
to
Thanks.

"Dale Levesque" <dale at dynamicwindows.com> wrote in message

news:4E3AF21100C59288...@in.WebX.maYIadrTaRb...

0 new messages