.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to keep AutoCAD hidden while NetLoading

1 REPLY 1
Reply
Message 1 of 2
Anonymous
332 Views, 1 Reply

How to keep AutoCAD hidden while NetLoading

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
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost