.NET

.NET

Reply
Active Contributor
tangferry
Posts: 43
Registered: ‎04-21-2005
Message 1 of 4 (293 Views)

Loading and Unloading .NET extensions

293 Views, 3 Replies
05-28-2005 11:32 PM
It is a wasting time stopping and re-starting AutoCAD just to make simple code changes or when debugging their plugins.
Can someone solve this problem?
There is a post about this topic in http://www.cadvault.com/forums/thread15360.html
*Simon
Message 2 of 4 (293 Views)

Re: Loading and Unloading .NET extensions

05-29-2005 07:14 AM in reply to: tangferry
The starting and stopping really gets on my nerves. I thought to use a
Windows Application and reference the current drawing from it as was
possible in VB6 but I can't suss out the equivelant of the statements below
to reference Autocad 2006 from vb.net.

Dim CadApp As AcadApplication
Dim CadDwg As AcadDocument
Set CadApp = GetObject(, "AutoCAD.Application")
Set CadDwg = CadApp.ActiveDocument

If anyone knows the answer please post as at least you could change code
then compile the thing into a class when finished.

Simon


wrote in message news:4859656@discussion.autodesk.com...
It is a wasting time stopping and re-starting AutoCAD just to make simple
code changes or when debugging their plugins.
Can someone solve this problem?
There is a post about this topic in
http://www.cadvault.com/forums/thread15360.html
*Frank Oquendo
Message 3 of 4 (293 Views)

Re: Loading and Unloading .NET extensions

05-29-2005 09:17 AM in reply to: tangferry
Simon wrote:

> If anyone knows the answer please post as at least you could change
> code then compile the thing into a class when finished.

GetObject still works in VB.NET but returns a ComObject, not an
AcadApplication object. Use the CType function to cast that ComObject to the
appropriate type. This will address your earlier question about circles as
well.
*Albert Szilvasy
Message 4 of 4 (293 Views)

Re: Loading and Unloading .NET extensions

05-29-2005 10:43 AM in reply to: tangferry
.NET plugins are currently unloadable. There's no way around it. The reason
is fairly simple:
.NET framework does not allow the unloading of individual assemblies (there
are good reason for this, you can read about them here:
http://blogs.msdn.com/jasonz/archive/2004/05/31/145105.aspx)

There are ways arounds this: we could load plugins into their own appdomains
and then when you want to unload the plugin we could destroy the appdomain
effectively unloading the plugin. We are looking into making this happen in
a future release.

Albert

wrote in message news:4859656@discussion.autodesk.com...
It is a wasting time stopping and re-starting AutoCAD just to make simple
code changes or when debugging their plugins.
Can someone solve this problem?
There is a post about this topic in
http://www.cadvault.com/forums/thread15360.html
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.