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

Loading and Unloading .NET extensions

3 REPLIES 3
Reply
Message 1 of 4
tangferry
590 Views, 3 Replies

Loading and Unloading .NET extensions

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
3 REPLIES 3
Message 2 of 4
Anonymous
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
Message 3 of 4
Anonymous
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.
Message 4 of 4
Anonymous
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

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