2

I have a class library dll that loads AutoCAD scripts from a network folder. However I need a way to ensure the class library can be updated silently. With Windows Form applications I would just use a ClickOnce Deployment and then use Application.Restart, however as this has to be a Class Library (as it is an AutoCAD addon) this doesn't seem to be possible.

What's the best way to handle this?

Ognyan Dimitrov
  • 6,026
  • 1
  • 48
  • 70
Bill Peet
  • 477
  • 1
  • 8
  • 23

3 Answers3

0

This is not possible with AutoCAD plugins because the DLL is loaded in the AppDomain. This 'silent' update is possible only with C++.

You can go the TDD way which is good practice. Here is a handout on the topic because TDD in AutoCAD is not that easy because of the above mentioned problem.

You can try to develop you algorithm in your own classes in order to have better TDD experience. Then transfer it with DTOs to AutoCADs transaction.

Ognyan Dimitrov
  • 6,026
  • 1
  • 48
  • 70
0

Some developers have 2 (or more) DLLs with AutoCAD code: the 1st main DLLs loads on AutoCAD startup, check for updates, download and install. The 2nd DLL actually contains the commands that will be demand loaded when the user run the command.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
0

I recently built a solution that allows reloading the same copy of a .dll into AutoCAD.

Check out my blog with the full solution:

http://www.cadwiki.net/blogpost/How-to-reload-a-.dll-into-AutoCAD

cadwiki.net
  • 68
  • 1
  • 5
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 30 '22 at 14:01