The example below provides some basic code for establishing a COM connection to AutoCAD using VB.NET. After a connection is established, it is then possible to send remote commands to the AutoCAD command-line as well as automate other features in the program.
The screenshot shows a custom Grasshopper VB.NET component using this code.
The process is quite simple.... Head over to The Proving Ground Wiki for details...