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.

  1. Paul Richardson Avatar
    Paul Richardson

    Cyrille and Kean, I cannot Thank you gentlemen enough, works like a charm.

    Cheers,
    Paul

  2. 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.

  3. Kean Walmsley Avatar

    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.

  4. Peter Elkjaer Avatar

    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

  5. 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

  6. 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.

  7. 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

  8. 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 (autodesk.com/dev...), as a place to start. Otherwise, check the training schedule at autodesk.com/api....

    Regards,

    Kean

  9. 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

  10. Hi Craig,

    What error message did you get? And did you try following Step 2, to see if it helped?

    Regards,

    Kean

  11. 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

  12. 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.

  13. 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:

    msdn2.microsoft.com/...

    Visual C# 2005 Express seems to puke on any scripts including arx stuff.

  14. 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.

  15. 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

  16. OK - please check out this post for more on this topic:

    keanw.com/...

    Thanks, all, for your input/feedback.

    Kean

  17. 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

  18. Hi Arun,

    Did you try the template posted here, instead?

    keanw.com/...

    Regards,

    Kean

  19. 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.

  20. 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

  21. hi
    how can i download objectarx for autocad 2007 or upper version?
    please give an address to solve this problem.
    thanks.

  22. Kean Walmsley Avatar
    Kean Walmsley

    objectarx.com or autodesk.com/objectarx should get you to a landing page from where you can select "License & Download".

    Regards,

    Kean

  23. 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

  24. Kean Walmsley Avatar

    Hi Patrick,

    Please email oarxwiz-feedback@autodesk.com with as much information on the error as you can (which OS etc.).

    Regards,

    Kean

  25. 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

  26. Hi Kean,

    I got the error message "undefined is null or not an object" from visual studio 2005 Team when trying to create com wrapper class for customized object through the objectarx wizard for Autocad 2008. Creating a customized object was successful. Any idea?

    Thanks a lot!

    Simon

  27. Hi Simon,

    I've passed your question across to the ObjectARX Wizard team - I'd suggest using this email alias, in future: oarxwiz-feedback@autodesk.com.

    Regards,

    Kean

  28. Hi Simon,

    We weren't able to reproduce this from our side: please try re-installing the Wizard, and if it doesn't help, please email oarxwiz-feedback@autodesk.com and we'll work with you to try to reproduce and fix the problem.

    Regards,

    Kean

  29. Hi Kean,
    Your explanations are very helpfull but i have a problem. During the linking, it search for the mfc80u.lib which is not on my computer
    I have mfc80u.dll files in various directories
    Thank's for your help
    Yann

  30. Hi Yann,

    Unfortunately I don't have time to provide support that's not specifically related to problems with code I've posted on this blog.

    Please post your question to the ADN site, if you're a member, or otherwise the ObjectARX Discussion Group.

    Regards,

    Kean

  31. A bit late perhaps to jump on this train, but anyhow....
    I'm using VS2005 / Acad2008 / OARX 2008
    I installed the wizzard but:
    - there are only 7 buttons in the tool bar instead of 8.
    - there is no OARX project template in the new|project menu.
    Removing and reinstalling the wizzard didn't help.
    Can anyone help with this?

    Thanks

    alex

  32. Alex -

    You might try emailing oarxwiz-feedback@autodesk.com.

    Kean

  33. Hi Kean,
    I have Visual Studio 2008 installed on my company laptop. The file structure appears to be different to the examples you have shown and I am struggling to get the fix to work. Can you offer any advice on where the arx file/folders need to be placed?

    Steve

  34. Kean Walmsley Avatar

    Hi Steve,

    You probably want to try the version discussed in this post instead.

    Regards,

    Kean

  35. Does it work with Autocad 2011 64bit and Visual Studio express 2010?

  36. To the best of my knowledge we haven't yet posted a Wizard that installs against VS 2010 (or its variants).

    Kean

  37. Nothing works.
    The ArxWizards.msi (ObjectArx 2011) refuses to install.
    All I get is the message "Microsoft Visual Studio 2008 must be present on the target machine".
    The same happens with the 2010 release.
    I also tried changing the Registry entry with "9.0" and "10.0" instead of 8 without result.
    Changing "ProductDIR" to "C:\Program Files (x86)\Microsoft..." didn't help either.
    my config: Win7(64bit)

  38. Kean Walmsley Avatar

    We're working on a version that works with VS 2010.

    Kean

  39. Any update on Autocad 2011 Windows 7, 64bit and Visual Studio express 2010 ?

  40. It depends - this post links to a new version of the AutoCAD .NET Wizard, but the ObjectARX Wizard won't support VS 2010 until we switch to it ourselves.

    Kean

  41. Will try that and see what happens. Thank you very much.

  42. Many thanks!

  43. Sorry, I am not a professional programmer and not a operating-system specialist.
    I have installed Win7/prof, Autocad 2012 and Visual Studio 2010 Express.
    My scope is to convert VBA-aplications for running under Win7 Autocad 2012/64 as a .Net application.
    Attempting to install ArxWizards.msi, the known message "Visual Studio 2008 or 2010 must be present on the target machine" appairs.
    Can You give me an actualized Help?
    Thanks
    Aribo Gretzer
    Montaniweg 6A
    I 39012 Meran
    Italy

  44. I'm afraid I can't give you better advice than the first step in the list. You need to have some level of comfort with Registry editing to attempt this.

    You really don't need the ObjectARX Wizard, though: try installing the AutoCAD .NET Wizards from the AutoCAD .NET Developer Center.

    I hope this helps,

    Kean

  45. xanhnhnn280683@gmail.com Avatar
    xanhnhnn280683@gmail.com

    Welcome Forum!
    I have a question related to vba of AutoCad, reference your comments. Comments Reference sent to the email address: xanhnhnn280683@gmail.com thank you.

    Sub testboundary
    Dim kiemtradoituong As Long, RetPoint As Variant
    kiemtradoituong = ThisDrawing.ModelSpace.Count
    Dim pt As Variant
    pt = ThisDrawing.Utility.GetPoint(, "Select object or enter to finish")
    ThisDrawing.SendCommand "-Boundary" & vbCr & pt(0) & "," & pt(1) & vbCr & vbCr
    If ThisDrawing.ModelSpace.Count > kiemtradoituong Then
    RetPoint = ThisDrawing.Utility.GetPoint(, " non domain Empty ")
    Else
    RetPoint = ThisDrawing.Utility.GetPoint(, " domain Empty ")
    End If
    End sub
    by VB.net language that supports creating dynamic library (dll), so I make run some examples vba in autocad.
    when I create file dll by visual tudio 2010 (VB.net) support, the variable (Dim pt As Variant) in vba autocad, VB.net changed (Dim pt As Object) run vba autocad error, looking for help
    Best regards
    Xanhnhnn280683

  46. Please stop with the spam. Once more and I'll be forced to block you.

    Kean

Leave a Reply to Craig Cancel reply

Your email address will not be published. Required fields are marked *