Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Maksim Sestic" <
href="mailto:info@geoinova.com">info@geoinova.com> wrote in message
href="news:4959933@discussion.autodesk.com">news:4959933@discussion.autodesk.com...
Let me explain the problem a bit more
precise: I need to load .NET DLL into
running ACAD application namespace, but externally - out of another process
(Startup module, source excerpt below). How possibly can I get it
working?
Startup module (that fires ACAD up) references
following libs found in GAC:
- Autodesk.AutoCAD.Interop.dll
-
Autodesk.AutoCAD.Interop.Common.dll
size=2>
size=2>Imports
Autodesk.AutoCAD.Interop
color=#008080>''' Startup module that fires up
ACAD
size=2>Module Startup
Sub Main()
color=#008080>''' Start ACAD the easy way... No error
checking...
size=2> Dim oACAD
color=#0000ff size=2>As
Autodesk.AutoCAD.Interop.AcadApplication
oACAD =
New
Autodesk.AutoCAD.Interop.AcadApplication
color=#008080>''' >>> I simply don't want to load assembly
via Lisp here.
'''
>>> I've been thinking of using P/Invoke, still don't know what
set of
'''
>>> acad.exe functions is responsible for netload-ing an
assembly.
'''
>>> Using a bit more managed approach is even more welcome
🙂
oACAD.ActiveDocument.SendCommand( _
"(command
" + Chr(34) + _
"NETLOAD"
+ Chr(34) + " " + Chr(34) + _
"TCGDotNet16.dll" + Chr(34) + ")" + vbLf)
End
size=2>Sub
color=#0000ff size=2>End
color=#0000ff size=2>Module
color=#0000ff size=2>
color=#0000ff size=2>Thanks for any
suggestion on that matter.
color=#0000ff size=2>
color=#0000ff size=2>
color=#000000>Regards,
color=#0000ff size=2>Maksim
Sestic