Running a vb.NET dll from a network in AutoCAD doesn’t work very well on it’s own. It appears, at least from my small sample size, to work as long as the code doesn’t use Windows Presentation Foundation. If the code utilizes a routine that AutoCAD runs with WPF, AutoCAD crashes indicating that the routine isn’t supported. Unfortunately prompting the user for information such as a number or object causes this crash.
A way around this is to use the LispFunction available in .NET. The LispFunction passes a ResultBuffer between the .NET routine and a LISP command. By utilizing a LISP routine I was able to avoid the WPF issue. The LISP routine gets any objects or numbers required from the user and then passes them to the .NET routine. The first code I created worked fine on Civil 3D 2008, but crashes Civil 3D 2009 & Civil 3D 2010. I suppose the AutoCAD API was revised to use WPF after AutoCAD 2008. I then had to resort to using the LispFunction.
For more information on how to use the LispFunction check out these AU Papers:
CP211-3 VB.NET Command School
DE211-2 The Best of Both Worlds: .NET and LISP Can Coexist
Both papers may be found at AutodeskUniversity.com or AUGI.com.