Enhanced AutoCAD .NET Project Application Wizard

The original "AutoCAD Managed application wizard" is very simple. Only the "Autodesk.AutoCAD.Runtime" namespace is imported, but the ObjectARX application often needs other namespaces such as "Autodesk.AutoCAD.DatabaseSevices" and "Autodesk.AutoCAD.ApplicationSevices". Furthermore, you must type "netload" to load the built assembly.

So, I decided to rewrite the wizard to solve these problems.

Note:There are different versions for Visual Studio 2005/2008 and C#/VB 2008 express edition.In the following demonstration,I will select Visual Studio 2008.

1.Download the suitable version from http://www.codeplex.com/dotnetarx,then unzip it.Double click the .msi setup file,and install the wizard.

2.Invoke Visual Studio 2008 IDE then start a new project. Select the node "ObjectARX" under "Visual C# Projects" and click on the template "AutoCAD Managed CS Project Application" as shown below:

3.Type in a project name, here we enter "Test". Set the location where you want the project to be created. Select OK. The "Managed C# Application Wizard For AutoCAD2008" dialog will then appear.

4.You can select the AutoCAD version,open a drawing when AutoCAD is launched,add the AutoCAD COM reference to your program, and enable Unmaged debugging.

5.Select the tab "Assemblies&Namespaces" and check the checkbox before the name of the assembly and namespace you want to include in your application. Note: "Autodesk.AutoCAD.Runtime" ,"Autodesk.AutoCAD.DatabaseServices" ,"Autodesk.AutoCAD.ApplicationServices", "Autodesk.AutoCAD.EditorInput" are checked by default because they are often included in the ObjectArx applications, you can uncheck them if your application does not need these namespaces.

6.Select the tab "Class" to add summary description for your application and the common used variables such as db,ed,and trans.

7.Click "Finish" to accept the settings you have selected.

8.Press F5 to debug your application,the correct version of AutoCAD will be launched.You don't need to type "netload",just type the command name you will get the result!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值