Chapter 37: Programming with .NET
In This Chapter
Understanding .NET and AutoCAD Creating VB.NET code Using the command line to obtain user input Using the dialog boxes to obtain complex user input Modifying objects using constants and functions Troubleshooting errors
.NET is an application development platform that allows you to create applications using programming languages like Visual Basic.NET (VB.NET) or C#. VB.NET is an evolution of the Visual Basic and Visual Basic for Applications (VBA) programming languages. Unlike VBA, the VB.NET development environment is stand-alone and not part of an application like Microsoft Word or AutoCAD.
Prior to deploying .NET applications, you need to install the .NET Framework on all computers that will run your programs. Fortunately, AutoCAD installs the .NET Framework if it is not already on your computer, because several commands in AutoCAD require the .NET Framework. LAYERS, CUI, and EATTEXT are examples.
AutoCAD LT does not support .NET or VBA. This entire chapter applies to AutoCAD only. •
While VBA is still available in AutoCAD 2012, Autodesk no longer supports it and plans to remove it completely from the next release. Autodesk recommends that you migrate your VBA projects to .NET or Visual LISP (unless you know C++ and ObjectARX). If you still need to use your VBA applications, you can download and install the VBA module from www.autodesk.com/vba-download. On the website, choose the file for your operating system. ...