Converting dvb to dll

Converting dvb to dll

Anonymous
Not applicable
902 Views
9 Replies
Message 1 of 10

Converting dvb to dll

Anonymous
Not applicable
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
0 Likes
903 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable
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" wrote in message
news:E270A850EE4CA7032629687FC421F1A1@in.WebX.maYIadrTaRb...
| 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
|
|
0 Likes
Message 3 of 10

Anonymous
Not applicable
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
0 Likes
Message 4 of 10

Anonymous
Not applicable
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" wrote in message
news:E2E251ADC1678CE8F48FE6A3D3F8214F@in.WebX.maYIadrTaRb...
> 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
>
0 Likes
Message 5 of 10

Anonymous
Not applicable
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" wrote in message
news:530B17BFCB4DCB40E046511A64675642@in.WebX.maYIadrTaRb...
| 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" wrote in message
| news:E2E251ADC1678CE8F48FE6A3D3F8214F@in.WebX.maYIadrTaRb...
| > 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
| >
|
|
0 Likes
Message 6 of 10

Anonymous
Not applicable
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" wrote in message
news:E270A850EE4CA7032629687FC421F1A1@in.WebX.maYIadrTaRb...
> 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
>
>
0 Likes
Message 7 of 10

Anonymous
Not applicable
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.

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

Anonymous
Not applicable
Thanks! That must mean that a VBA app is in process as well?


"Frank Oquendo" wrote in message
news:C6D48F8814FBD8362257F4FAD2A92D92@in.WebX.maYIadrTaRb...
> 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.
>
> --
> "It is more important that you know how to find the answer than to have
> the answer" - Me
> http://code.acadx.com
>
0 Likes
Message 9 of 10

Anonymous
Not applicable
Dale Levesque wrote:

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

You're welcome. And yes, it is.

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

Anonymous
Not applicable
Thanks.

"Dale Levesque" wrote in message
news:4E3AF21100C5928836386AADB8931824@in.WebX.maYIadrTaRb...
> 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" wrote in message
> news:E270A850EE4CA7032629687FC421F1A1@in.WebX.maYIadrTaRb...
> > 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
> >
> >
>
>
0 Likes