netload - is there a NET UNLOAD command?

netload - is there a NET UNLOAD command?

fieldguy
Advisor Advisor
17,026 Views
7 Replies
Message 1 of 8

netload - is there a NET UNLOAD command?

fieldguy
Advisor
Advisor
Is there a way to unload a .dll other than exit autocad?
Accepted solutions (1)
17,027 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Accepted solution
No.
0 Likes
Message 3 of 8

fieldguy
Advisor
Advisor
Thanks
0 Likes
Message 4 of 8

Anonymous
Not applicable
Might there ever be a way? :o) Edited by: mamj@topsoe.dk on Jul 24, 2009 2:22 PM
0 Likes
Message 5 of 8

chiefbraincloud
Collaborator
Collaborator
I don't proclaim to understand all of the possible reasons, but the way I hear it, the reason there is no Unload has to do with the .NET framework, not AutoCAD. The root of the situation is that .NET assemblies cannot be unloaded from an AppDomain.
There is more info here: if you are interested. Edited by: chiefbraincloud on Jul 24, 2009 12:11 PM
Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 6 of 8

Anonymous
Not applicable
However, it is possible to unload an AppDomain. If Autodesk really wanted to, they could figure out a way to unload/reload assemblies. For instance, you could either maintain a separate AppDomain for each add-on assembly, or if a single AppDomain was used, you could unload and reload it without a specific add-on assembly. Either way would have the effect of unloading the assembly. It is possible, but there's no telling how much rework/redesign it would take unless anyone happens to be familiar with the inner workings and design of AutoCAD.
0 Likes
Message 7 of 8

Anonymous
Not applicable
{quote}

If Autodesk really wanted to, they could figure out a way to unload/reload
assemblies

{quote}

No, they can't do that because it's not possible.

{quote}

For instance, you could either maintain a separate AppDomain for each add-on
assembly....

{quote}

No, because you can't pass AutoCAD API objects across AppDomains. AppDomains are
designed to not be process- or machine-dependent.

IOW, .NET makes no distinction between two AppDomains that reside in the same
process on a single machine, and two AppDomains that reside in two different
processes, each running on two different computers located in different parts of
the planet.

Hence, to go across AppDomains you must use remoting, and few if any AutoCAD API
objects are remotable.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6355067@discussion.autodesk.com...
However, it is possible to unload an AppDomain. If Autodesk really wanted to,
they could figure out a way to unload/reload assemblies. For instance, you could
either maintain a separate AppDomain for each add-on assembly, or if a single
AppDomain was used, you could unload and reload it without a specific add-on
assembly. Either way would have the effect of unloading the assembly. It is
possible, but there's no telling how much rework/redesign it would take unless
anyone happens to be familiar with the inner workings and design of AutoCAD.
0 Likes
Message 8 of 8

Anonymous
Not applicable

Go look at the Package Contents file, and comment out the <components></components> part of the dll you wish not to have loaded when autocad starts up.

0 Likes