New projects are created based on a project template. When creating a new project that will be built into a DLL assembly that will be loaded into AutoCAD, use the Class Library template that comes with Microsoft Visual Studio or one of the AutoCAD Managed project application templates that get installed with the AutoCAD .NET Wizard. Both types of templates are available for the VB.NET and C# programming languages. After a new project is created, you will need to reference the files that make up the AutoCAD .NET API.
Procedures
To create a new project using a standard template
- In Microsoft Visual Studio, click File menu New Project (or click File menu New Project).
- In the New Project dialog box, Installed Templates tree, expand Other Languages Visual Basic or Visual C# and select Windows.
- Under Templates, select Class Library.
- In the Name box, enter a name for the new project.
- In the Location box, enter a location or click Browse to select a folder for the new project.
- In the Solution Name box, enter a name for the new solution that the project will be added to.
- Optionally, from the Selection drop-down list, select Create New Solution, Add to Solution, or Create in New Instance to determine how the new project should be created in relation to the solution that is currently open.
- Optionally, select the Create Directory for Solution check box to create a sub-folder before creating the new solution and project. Select the Add to Source Control check box to add the solution and project to a source control database.
- Click OK.
To create a new project using an AutoCAD Managed template
Before using one of the AutoCAD Managed templates, you must first download and install the latest release of the ObjectARX SDK.
- In Microsoft Visual Studio, click File menu New Project (or click File menu New Project).
- In the New Project dialog box, Installed Templates tree, expand Other Languages Visual Basic or Visual C# and select Autodesk.
- Under Templates, select AutoCAD <release> VB Plug-in or AutoCAD <release> C Sharp Plug-in.
- In the Name box, enter a name for the new project.
- In the Location box, enter a location or click Browse to select a folder for the new project.
- In the Solution Name box, enter a name for the new solution that the project will be added to.
- Optionally, from the Selection drop-down list, select Create New Solution, Add to Solution, or Create in New Instance to determine how the new project should be created in relation to the solution that is currently open.
- Optionally, select the Create Directory for Solution check box to create a sub-folder before creating the new solution and project. Select the Add to Source Control check box to add the solution and project to a source control database.
- Click OK.
- In the AutoCAD .NET Wizard Configurator dialog box, specify the libraries to reference to the project.
- Click OK.