Click here to Skip to main content
15,892,059 members
Articles / Programming Languages / C#
Article

New AutoCAD Managed C# Project Application Wizard

Rate me:
Please Sign up or sign in to vote.
4.42/5 (8 votes)
22 Aug 20052 min read 85.4K   1.2K   27   9
With "New AutoCAD Managed C# Project Application Wizard", you will be able to write your ObjectARX application (.NET) more conveniently.

Introduction

The original "AutoCAD Managed C# 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, the version of "System.dll" assembly and "System.Data.dll" assembly is 1.0, but in Visual Studio .NET 2003 we need version 1.1. So, I decided to rewrite the wizard to solve these problems. Download the files in the attachment and unzip them. Then copy the folder "VC#" to the directory: \Program Files\Microsoft Visual Studio .NET 2003\.

  • Invoke Visual Studio .NET 2003 IDE then start a new project. Select the node "Visual C# Projects" and click on the template "New AutoCAD Managed CS Project Application" as shown below:

    Image 1

  • Type in a project name, here we enter "Test". Set the location where you want the project to be created. Select OK. The "AutoCAD Managed CSharp Application Wizard For AutoCAD2006" dialog will then appear. Enter your Registered Developer Symbol (RDS). Here we enter "arx". For more information on Registered Developer Symbols (RDS) go to this URL.

    Image 2

  • Select the tab "NameSpace" and check the checkbox before the name of the namespace you want to include in your application. Note: "Autodesk.AutoCAD.Runtime" and "Autodesk.AutoCAD.DatabaseServices" are automatically added to your application. "Autodesk.AutoCAD.ApplicationServices", "Autodesk.AutoCAD.EditorInput" and "Autodesk.AutoCAD.DatabaseServices.TransactionManager" 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.

    Image 3

  • Select the tab "CommandMethod and Commit" to define the name of the CommandMethod attribute. The wizard will add a function that we can use for our command, and give it the same name as the CommandMethod attribute. In this tab, you can also add summary description for the class and determine whether to have a constructor of the class or not (by default, the class will have a constructor).

    Image 4

  • Select the tab "Unmanaged Option" to determine whether to use unmanaged code or not.

    Image 5

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralProject creation failed Pin
kishorekumar BV16-Apr-09 22:03
kishorekumar BV16-Apr-09 22:03 
GeneralRe: Project creation failed Pin
Ontario701-Feb-10 23:37
Ontario701-Feb-10 23:37 
Questionwhich version we should use Pin
tubiskasaroos16-Jul-07 7:47
tubiskasaroos16-Jul-07 7:47 
QuestionMore of of Autocad+C# Pin
A4ad29-May-06 1:26
A4ad29-May-06 1:26 
QuestionHow to debug in .net 2003 Pin
garyzi30-Mar-06 4:05
garyzi30-Mar-06 4:05 
Hi,

This is a very helpful tool. Thanks.

I tried to debug the code in .net 2003, but failed to do so. I am using AutoCAD 2006 objARX and .net 2003. I put acad.exe in Startup app. But every time I hit F5, the AutoCAD starting up picture shows up for 2 seconds, then disappear.

I could open AutoCAD separately, and use netload to load the dll, and use the function name to do the thing expected. However, I couldn't catch the breakpoint in this mode. Any idea why, and how to debug?

Thanks lot,

Gary
GeneralAutoCad Tool Palette window with .Net Pin
prakashdotc20-Mar-06 2:20
prakashdotc20-Mar-06 2:20 
GeneralDebugging a net arx... Pin
anderslundsgard23-Feb-06 2:13
anderslundsgard23-Feb-06 2:13 
GeneralRe: Debugging a net arx... Pin
Tim Hoffeller17-Mar-06 1:50
Tim Hoffeller17-Mar-06 1:50 
GeneralRe: Debugging a net arx... Pin
anderslundsgard21-Mar-06 23:08
anderslundsgard21-Mar-06 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.