.NET

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

Loading and Unloading .NET extensions

259 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 (259 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 (259 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 (259 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community