How to keep AutoCAD hidden while NetLoading

How to keep AutoCAD hidden while NetLoading

Anonymous
Not applicable
451 Views
1 Reply
Message 1 of 2

How to keep AutoCAD hidden while NetLoading

Anonymous
Not applicable
Hi.
I'm writing an app that remotely starts AutoCAD and does some processing.
For the startup part, I use COM, for the whole lot of functionality I use .NET API.
My problem now is the user shouldn't see AutoCAD popping up.
When starting ACAD using COM, the window is hidden from view anyway, it only pops up when some user interaction is required.
And here the problem begins:
After starting ACAD using COM the user won't see any ACAD-window.
Now, to go on with my app, I need to load the .NET assembly.
I do this using _acadApp.SendCommand( string.Format("netload assembly.dll\n"))
This works just fine but leads to a visible ACAD-Window.
When I add _acadApp.Visible = false after loading the dll, the window will disappear again.
This causes a flickering ACAD-window between the calls to netload and visible = false.

Is it possible to load .NET dlls without popping up the ACAD-window?
Would be great if I could hide the window completely from view- as long there's no error the user should be informed about.
It's nice that the window will show up when some kind of user interaction is required, but in this case it's only disturbing.

Maybe it is possible to load the DLL by the COM-interface?
There are methods to load ARX and DVB files, but I haven't found anything yet regarding DLLs 😞

I'd appreciate any suggestion you have to this problem.

Best Regards
Christian Nitschkowski
0 Likes
452 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Try these two approches:

1. Load your .NET DLL at Acad startup. Say, you can add

(command "_.NETLOAD" "C:\\folder\\NETDLL.dll")

into Acad's Acad200x.lsp or Acad200xdoc.lsp, so that your NET Dll gets
loaded when Acad/Acad drawing starts/opens

2. Make your NET DLL command load on demand by modifying Windows registry.


wrote in message news:5494371@discussion.autodesk.com...
Hi.
I'm writing an app that remotely starts AutoCAD and does some processing.
For the startup part, I use COM, for the whole lot of functionality I use
.NET API.
My problem now is the user shouldn't see AutoCAD popping up.
When starting ACAD using COM, the window is hidden from view anyway, it only
pops up when some user interaction is required.
And here the problem begins:
After starting ACAD using COM the user won't see any ACAD-window.
Now, to go on with my app, I need to load the .NET assembly.
I do this using _acadApp.SendCommand( string.Format("netload
assembly.dll\n"))
This works just fine but leads to a visible ACAD-Window.
When I add _acadApp.Visible = false after loading the dll, the window will
disappear again.
This causes a flickering ACAD-window between the calls to netload and
visible = false.

Is it possible to load .NET dlls without popping up the ACAD-window?
Would be great if I could hide the window completely from view- as long
there's no error the user should be informed about.
It's nice that the window will show up when some kind of user interaction is
required, but in this case it's only disturbing.

Maybe it is possible to load the DLL by the COM-interface?
There are methods to load ARX and DVB files, but I haven't found anything
yet regarding DLLs 😞

I'd appreciate any suggestion you have to this problem.

Best Regards
Christian Nitschkowski
0 Likes