Getting the ObjectARX Wizard to work with Visual Studio Express editions
This topic was suggested by one of our ADN members - Paul Richardson, from CAD System Engineering - and answered by Cyrille Fauvel, from DevTech EMEA. So all I really had to do was copy/paste and some minor editing... now that's my kind of blogging. :-)
The ObjectARX Wizard's installer targets the Microsoft Visual Studio 2005 platform rather than the Microsoft Visual C++/C#/VB.NET Express Editions. The main reasons for this are the limitations of the Express Editions' IDE - particularly due to its lack of support for AddIns. The ObjectARX Wizard is actually made up of a number of components:
- AppWizards - these are "project templates" with an HTML interface that allows basic set-up of projects
- Class Wizard - another HTML interface that allows creation and modification of classes, etc.
- AddIn - this is a more complex application (not defined in HTML), allowing addition of commands and including functionality such as the Class Explorer
While the Express Editions support applications based on HTML (e.g. the AppWizards and the Class Wizard), they do not support AddIns. Which means only part of the functionality of the ObjectARX Wizard can be made to work.
Having said that, the below procedure will allow you to get this subset of the overall functionality working for Visual C++ Express (and it should be comparable to get it working for C#/VB.NET, but for now this approach has only been verified for Visual C++ Express):
1. First we need to fool the ObjectARX Wizards' installer into thinking Visual Studio is installed.
Go to the Registry and create the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS
Add a string value: name= 'ProductDir', value = where we want to install the ObjectARX Wizards files to. It's suggested to make this 'C:\Program Files\Microsoft Visual Studio 8\' - the below procedure assumes that. Note: do not forget the trailing '\'.
This registry change will allow you to install the ObjectARX Wizards.
2. The installer will create some new files in the above location, which need to be copied to your Express installation.
Go into 'C:\Program Files\Microsoft Visual Studio 8\VC\vcprojects' and copy the ObjectARX directory into 'C:\Program Files\Microsoft Visual Studio 8\VC\Express\vcprojects'.
Copy the 'C:\Program Files\Microsoft Visual Studio 8\VC\vcprojects\ArxAppWiz.*' files into 'C:\Program Files\Microsoft Visual Studio 8\VC\Express\vcprojects'.
Finally copy the C:\Program Files\Microsoft Visual Studio 8\VC\VCAddClass\ObjectARX' directory into 'C:\Program Files\Microsoft Visual Studio 8\VC\Express\VCAddClass'.
After these steps all the templates-based Wizards will be available in the Visual C++ Express Edition.

Subscribe via RSS
Cyrille and Kean, I cannot Thank you gentlemen enough, works like a charm.
Cheers,
Paul
Posted by: Paul Richardson | July 05, 2006 at 11:25 PM
Great post, I have been waiting for this one for years..
Do you think it be possible to get Visual c++ 2005 express edition to work with Microsoft c++ 2003 toolkit libraries and ObjectARX 2002/4/5/6 ?
The reason I am asking is that although my company has 2007 based products, via subscription, however migration depends on projects - which means it's going to be a while.
P.S If you wish to email me replace dot with . in email address, Thanks again.
Posted by: J Talisman | July 20, 2006 at 01:03 PM
I think your question is around whether you can use a single IDE to build multiple versions of your app that support AutoCAD 2002-2007...
For AutoCAD 2002 you'll need VC6, which is really a tough one to throw into the mix, as it is really very different.
AutoCAD 2004-2006 will need VC7.0 (which is VS .NET 2002 - not 2003) to build the app. As the IDE for 7.0 was quite buggy, I know some people found a way to use the 2003 IDE with the 2002 compiler/linker to create an app that would load in AutoCAD 2004-2006. This is risky territory, though - born out of necessity at the time.
Your best bet, in my opinion, would be to maintain separate projects for each set of versions you need to support (2002, 2004-2006 and 2007), but reference common source files where possible. You would need the separate tools (VC6, VC7, VC8) to perform the builds, but it feels like a much safer option to me.
Posted by: Kean | July 20, 2006 at 05:53 PM
Hi
Nice article. Has anyone had any luck with getting the wizard to work in C# express edition.
Everytime I start a new project, I get: "Creating project test.... project creation failed"
Is there a log somewhere, to check where the creation fails?
/Peter
Posted by: Peter Elkjaer | July 28, 2006 at 01:12 PM
Hi Peter,
I just installed C# Express and the "AutoCAD Managed C# Project" template worked fine for me (although admittedly the test was on a system that already had full VS 2005 and VB Express installed on it). The only thing I did to get the project template working in C# Express was to copy the contents of "C:\Program Files\Microsoft Visual Studio 8\VC#\CSharpProjects" to "C:\Program Files\Microsoft Visual Studio 8\VC#\Express\CSharpProjects".
Regards,
Kean
Posted by: Kean | August 03, 2006 at 02:10 PM
I transposed the instructions here to the VB.NET Express installation directories and the Template for AutoCAD Managed VB project Application looks like it works fine! Thanks for this post.
Posted by: CAD Bloke | August 06, 2006 at 04:38 AM
hallo there,
i am a programmer from india, want to learn objectarx with .net platform. can you suggest what will be the better language in vc.net and c#? where i can get the training or online help or referrence in this topic?
if this mail irritate you, than i am relly sorry.
thanx,
soumen
Posted by: soumen | November 10, 2006 at 04:32 AM
Hi Soumen,
C++ and C# have their own pros and cons - overall if I were to choose one language to focus on, I'd choose C#. That said, with the current state of the managed API documentation, you will end up having to refer back to the underlying C++ documentation to understand what's going on.
I'd download the AutoCAD .NET Labs from the AutoCAD Developer Center (http://www.autodesk.com/developautocad), as a place to start. Otherwise, check the training schedule at http://www.autodesk.com/apitraining.
Regards,
Kean
Posted by: Kean | November 10, 2006 at 02:09 PM
I am using C# Express as well as the Web Dev. Express version. I performed step 1 and installed the Wizards. However it seems like I don't need to perform the second step as I can see the templates in the new dialog box for C#. That is until I receive and error from default.htm on line 411 char 4.
Can anyone help with this error?
Thanks,
Craig
Posted by: Craig | December 01, 2006 at 12:46 AM
Hi Craig,
What error message did you get? And did you try following Step 2, to see if it helped?
Regards,
Kean
Posted by: Kean | December 01, 2006 at 12:25 PM
Kean,
Thanks for the reply and btw great post. I did try step 2 and it did not help. I get the following error when I press the Finish button on the wizard page (the error appears regardless of the Unmanaged debug setting).
The error is: internet Explorer Script Error
Line: 411
Char: 4
Error: Object expected
Code: 0
URL: file://C:\Program files\Autodesk\ObjectARX Wizards for AutoCAD 2007\Auotcad Managed CS App\HTML\1033\default.htm
Thanks,
Craig
Posted by: Craig | December 01, 2006 at 06:49 PM
Kean,
I've managed to do Step 1 OK and most of step 2 but not the last. I can't find this folder?
Also, when I do start up C++ Express I get the templates there now, but when I try and use them I get a message saying the operation could not be completed? They don't seem to work at all.
Posted by: Charles Edwards | December 23, 2006 at 02:11 PM
I finally gave up trying to fix the Line 411 Object Error when using the Template script for an AutoCAD Managed C# Project using Visual C# 2005 Express, Windows2000, and .Net 2.0. I made my own template by creating an AutoCAD project, adding new using statements and proper references, and exporting to a template from the File menu. See:
http://msdn2.microsoft.com/en-us/library/xkh1wxd8(VS.80).aspx
Visual C# 2005 Express seems to puke on any scripts including arx stuff.
Posted by: Tim Sprout | January 04, 2007 at 11:32 PM
I fixed the Line 411 Object Error when using the Template script for an AutoCAD Managed C# Project in a Visual C# 2005 Express installation by copying the VC#Wizards folder from a Visual Studio 2005 installation into the VC# folder of the Visual C# 2005 Express installation. The default.js script for the AutoCAD wizard depends on the common.js script for C# which is found in this folder. C++ Express installs a VCWizards folder containing the C++ version of common.js. C# Express does not install a VC#Wizards folder containing the C# version of common.js.
Posted by: Tim Sprout | January 08, 2007 at 07:19 PM
Thanks, Tim.
I've asked a member of my team to take a look into your findings - I'll let you all know what I hear back.
Regards,
Kean
Posted by: Kean | January 09, 2007 at 10:02 AM
OK - please check out this post for more on this topic:
http://through-the-interface.typepad.com/through_the_interface/2007/01/managed_applica.html
Thanks, all, for your input/feedback.
Kean
Posted by: Kean | January 18, 2007 at 12:44 PM
i am a programmer from India , objectarx with .net platform. so i download Microsoft Visual Basic 2005 Express Edition and tried to install objectarx following your instruction and completed the steps and i could see the AutoCAD Managed VB Project Application but when i try to create a project it fails saying "Creating project lab2.... project creation failed" so if you could guide me that where i have missed or done something wrong so that i could correct myself.
If i have wasted your precious time please Forgive me.
Thanking your for reading
with regards
Arun Prasad.H
Posted by: arun | February 08, 2007 at 06:56 PM
Hi Arun,
Did you try the template posted here, instead?
http://through-the-interface.typepad.com/through_the_interface/2007/01/managed_applica.html
Regards,
Kean
Posted by: Kean | February 09, 2007 at 10:11 AM
I really enjoy this site, but have a general suggestion. At the begining of each new topic or article could you give the version of Autocad and Visual Studio and Objectarx the article is intended for and for which it will work. For example, if it has C# code will it work with Autocad 2005 and above and VS 2002 and above and Objectarx 2005 and above. Thanks.
Posted by: BP | August 09, 2007 at 04:13 PM
That's a valid point... I know it can be confusing, at times.
The root problem is with the amount of time it takes me to determine what code will work in which version, especially going back as far as AutoCAD 2005 (which - frankly speaking - really only had a preview version of the managed API). I do try to point out when I know for sure something was only introduced in a recent version, but it's not always easy to know, without performing test builds with multiple environments.
And as this is really only a hobby - I have a day job, too - it's something I can't guarantee will get done for every post (otherwise it will reduce the amount of time I spend on actual content).
I will do what I can, though.
Kean
Posted by: Kean | August 09, 2007 at 04:36 PM
hi
how can i download objectarx for autocad 2007 or upper version?
please give an address to solve this problem.
thanks.
Posted by: saeid | May 05, 2008 at 04:38 PM
http://www.objectarx.com or http://www.autodesk.com/objectarx should get you to a landing page from where you can select "License & Download".
Regards,
Kean
Posted by: Kean | May 05, 2008 at 04:42 PM
Hi to everybody!
I'm a programmer from Austria.
I've one problem on installing the objectarx wizard.
There will be allways the message: "Microsoft Visual Studio 2005 must be present on the target machine."
I've installed the full version of Microsoft Visual Studio 2005 and the registry key which is explained in the article above is also existant with the value.
What do i wrong?
I hope you can help me!
regards
-Patrick
Posted by: Patrick | May 21, 2008 at 11:02 AM
Hi Patrick,
Please email oarxwiz-feedback@autodesk.com with as much information on the error as you can (which OS etc.).
Regards,
Kean
Posted by: Kean | May 21, 2008 at 11:29 AM
Kean, Thanks for sharing your insight on this subject. I've searched high and low and I got lucky when I stumbled on to this page.
Again - Thanks!
Ben
Posted by: Ben | August 28, 2008 at 11:53 PM