Kean Walmsley

July 2009

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Twitter Updates

    follow me on Twitter



    « Getting started with AutoCAD and .NET | Main | Debugging using Express Editions »

    July 05, 2006

    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.

    TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d83452464869e200d834d2d3b669e2

    Listed below are links to weblogs that reference Getting the ObjectARX Wizard to work with Visual Studio Express editions:

    Comments

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

    Cheers,
    Paul

    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.

    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.

    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

    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

    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.

    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

    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

    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

    Hi Craig,

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

    Regards,

    Kean

    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

    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.

    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.

    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.

    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

    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

    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

    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

    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.

    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

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

    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

    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

    Hi Patrick,

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

    Regards,

    Kean

    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

    Verify your Comment

    Previewing your Comment

    This is only a preview. Your comment has not yet been posted.

    Working...
    Your comment could not be posted. Error type:
    Your comment has been posted. Post another comment

    The letters and numbers you entered did not match the image. Please try again.

    As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

    Having trouble reading this image? View an alternate.

    Working...

    Post a comment

    Feed & Share

    Search