ObjectARX & Dummies

Course Index

*Course support: Click here!
*Course and User samples: Download here!

Friday, January 28, 2005

Requirements

Hello,

Prior to begin the course I would like to list what are the requirements to create, compile and use ObjectARX applications.

I will use the most recent version that is ObjectARX 2005. Most of features presented will be compatible to previous versions (I will consider release 2000 and above).

What you will need:

  • AutoCAD 2000,2000i and 2002 (plus verticals): ObjectARX 2000 and Microsoft Visual C++ 6.0;
  • AutoCAD 2004, 2005 and 2006 (plus verticals): ObjectARX 2004 and Microsoft Visual C.NET 2002 (7.0);
  • AutoCAD 2007, 2008 and 2009 (plus verticals): ObjectARX 2007 and Microsoft Visual C.NET 2005 (8.0);

You may download AutoCAD trial versions from Autodesk web site (www.autodesk.com).

To download ObjectARX (for free), go to www.objectarx.com (this will redirect you to the right page at Autodesk's web site).

Once you have the above products, proceed with the installation:

  • Install AutoCAD (full option recommended);
  • Install Visual C++;
  • Install (just need to extract) ObjectARX to your computer;

On the next post I will explain how to install the ObjectARX Wizard tool.

Cheers!

63 Comments:

  • I have the folowing question..
    Is this software "Visual C++.NET 2003 Standard" ready to create ARX programs together with ObjectARX?

    By Anonymous maq, at 2:30 PM  

  • Hello maq,

    Officially only the Visual Studio .NET 2002 is supported which uses the .NET Framework 1.0 and MFC 7.0

    This applies to AutoCAD 2004,2005 and the brand new 2006.

    There are some tricks over the Internet to make VS.NET 2003 generate compatible code with 2002 but I really recommend you to use VS.NET 2002.

    If you already purchased the 2003 version just request a downgrade from Microsoft.

    Regards.

    By Blogger Fernando Malard, at 2:27 PM  

  • Hi Fernando, great website! My question is this, is there a difference between Visual Studio .Net 2002 "standard" and "professional"? Then which one should I get, to learn programming and customize arx for autocad? Thanks!

    By Anonymous Anonymous, at 2:43 PM  

  • Hi there,

    Regarding to ObjectARX requirements the Visual Studio .NET 2002 Standard, Professional, Enterprise Developer, Enterprise Architect and Academic will generate the same results.

    Basically, the differences among them are only about development tools included into the package.

    For more information, please take a look at:

    http://msdn.microsoft.com/vstudio/previous/2002/overview/academic/features/comparison.aspx

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 2:54 PM  

  • I have question:
    Does VISUAL STUDIO 2003 be suitable to ACAD 2005 ?

    By Anonymous Anonymous, at 3:59 PM  

  • Hi maq,

    VS 2003 (any flavor) is not officially compatible with AutoCAD 2004, 2005 and 2006. There are some tricks to allow it to generate compatible code but I really would suggest you to avoid these tricks.

    If you already have purchased the 2003 version you need to request a downgrade from Microsoft which is free and will charge you only for the media set.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 4:16 PM  

  • How can I downgrading MS VISUAL STUDIO 2003 to fit version for ObjectARX for ACAD2005 and 2006 ? I can't find it in Microsoft web site.

    By Anonymous Anonymous, at 6:53 PM  

  • Hi,

    You will need to contact Microsoft support by phone and request instructions on how to proceed. As far as I know you will pay only for the shipment and media.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 9:41 PM  

  • Hi Fernando!
    I like this page too.
    I need to implement an application for AutoCAD 2004, but I'm still using VS6.0 SP5, (because VS .NET 2002, 2003 and the 2005 beta was producing strange runtime errors when I was using mixed sources - old application in C and my C++ code.)
    What do you think, is it possible to use VC6 and its MFC with "ObjectARX for AutoCAD 2002" to develop an app for ACAD2004?
    Thanks in advance
    Tamas

    By Anonymous Tamas Veres, at 11:44 AM  

  • Hi Tamas,

    No, there is no way to load an application compiled with ObjectARX 2002 inside AutoCAD 2004 and above.

    You need to use VS.NET 2002 (SP0) to be 100% compatible with AutoCAD 2004 and above.

    Some people use some tricks to use VS.NET 2003 to build applications compatible with AutoCAD 2004 but it is not supported by Autodesk.

    There are several changes in MFC, ATL and inside the ObjectARX SDK that are probably causing the problems you report. The best thing to do is to migrate your applications step by step and fix all problems.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 1:54 PM  

  • I have been looking around on the web for a download of vc++ 6.0 but it appears we cant even buy this anywhere anymore? I bought the 2003 version fairly cheap in 2003 but I dont want a bunch of error ridden fixes just to get started with arx lol. Is there an actual download available that you know of without spending hours upon hours trying to virtually create something similiar?

    By Anonymous KewlToyZ, at 11:34 AM  

  • Hello KewlToyZ,

    If you are planning to develop for AutoCAD 2004,2005 or 2006 you can buy a VS2003 or VS2005 and require a downgrade license from Microsoft.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 11:40 AM  

  • I am using ADT 2005. Which version of C++ do I need. I have version 6.0 but I think I read somewhere that the OBJECT ARX.sdk will only work with C++ version 8.0. Is this true or can I get by with versionb 6.0? Also which version of Visual Studio do I need? Thanks for the help.
    David W Estridge
    dwestridge@comcast.net

    By Anonymous Anonymous, at 10:54 AM  

  • Hi David,

    ADT 2005 is based on AutoCAD 2005 so it will require Visual Studio 2002 (7.0) and at least ObjectARX 2004.

    ADT also requires its own specific framework which is called OMF (Object Modeling Framework). This framework will allow you to create and manage specific ADT objects and entities.

    Your VS2002 projects will need to use at least ObjectARX and OMF SDK if it will deal with ADT objects.

    IMPORTANT: If your ObjectARX application will only use native AutoCAD features and nothing from ADT API you can compile your projects without ADT headers and libraries. It will load fine on ADT and on any other AutoCAD based vertical.

    NOTE: ADT OMF SDK is only available to Autodesk ADN members.

    Hope this help.
    Fernando.

    By Blogger Fernando Malard, at 11:41 AM  

  • I'm sorry Fernando. I am using ADT 2006! NOT 2005. I hit the wrong key on my keyboard. Can go over the requirements that will be compatible for ADT 06 real quick please. I am very sorry for the inconvenience. Thanks
    Dave
    dwestridge@comcast.net

    By Anonymous Anonymous, at 1:32 PM  

  • Hi Dave,

    ADT 2006 will require the VISUAL STUDIO 2005 version and ObjectARX2005 SDK.

    All other remarks of my previous post are also valid to 2006. There is also a OMF 2006 SDK you need to use to be able to access specific ADT features.

    ObjectARX application compiled with 2005 are NOT binary compatible with 2006 and vice-versa.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 9:18 PM  

  • Hello Fernando,
    Can I use Microsoft Visual C++ express?
    Thanks

    By Anonymous Anonymous, at 7:55 AM  

  • Hello Fernando,
    Is it possible to use Microsoft Visual C++ Express?
    Thanks

    By Anonymous Anonymous, at 7:59 AM  

  • Hello,

    Check this article from Kean Walmsley:

    http://through-the-interface.typepad.com/
    through_the_interface/2006/07/
    getting_the_obj.html

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 8:24 AM  

  • I am planning to program with objectARX for autocad 2006. what other requirements do i need to install.
    thanks for the service

    By Blogger satya, at 6:12 AM  

  • I am planning to program with objectARX for autocad 2006. what other requirements do i need to install.
    thanks for the service

    By Blogger satya, at 6:13 AM  

  • Hello satya,

    AutoCAD 2006 requires:

    - ObjectARX 2004, 2005 or 2006;
    - Microsoft Visual C++ 2002 (7.0);

    Note that you are planning to use some features existing only on AutoCAD 2006 you will need to use ObjectARX 2006. In other hand, if you would like to make your application compatible with 3 versions (2004,2005 and 2006) you need to use ObjectARX 2004.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 8:17 AM  

  • Hello Mr. Fernando,
    Is there any access to ADT 2006 & LDT 2006 objects in ObjectARX 2006. I need to create parametrical foundation as bearing structure and to compute volume of soil in quadrant between two layers.

    By Anonymous Valdemar, at 6:47 AM  

  • Hello Valdemar,

    ADT has its own SDK which works together with ObjectARX. It is called OMF and is available only to ADN members.

    This way you need to signup ADN membership or use only AutoCAD level entities in your application.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 8:32 AM  

  • Hi Fernando,
    Your page's so cool.

    I'm using VC++6.0 and I want to develop ObjectARX for AutoCad 2000.
    Have I do anything different from your lessons?

    Thank in advance.

    By Anonymous Đào Anh Vũ, at 12:08 AM  

  • Hi,

    ObjectARX 2000 will be restrict as AutoCAD 2000 is.
    AutoCAD 2000 was the first version to provide MDI support.

    I'm not 100% sure what will work on 2000 but the major part of this Blog's concept applies to 2000 and some part of the code should work too.

    Regards,
    Fernando.

    By Blogger Fernando Malard, at 8:14 AM  

  • Hi there,

    I have a load of object ARX files I have found. I would like to look at them. Is there anyway to get a reader or some simple way of viewing the files>?

    By Blogger iain9876, at 8:22 AM  

  • Hi iain9876,

    ObjectARX unmanaged modules are C++ binary code which cannot be easily reversed engineered. If you have the PDB (program database) of this module you could try some third-party disassembler applications.

    The better option is to find the author and request its source code if he can provide.

    Regards.

    By Blogger Fernando Malard, at 8:30 AM  

  • Hi, I'm using Autocad 2004 and I'm trying to find Objectarx 2004. Where can I download objectarx 2004? Does Objectarx2005 work with autocad 2004?

    Thank you!

    By Blogger Guillaume, at 11:11 PM  

  • Hi Guillaume,

    The ObjectARX 2004 SDK is made available through the following Autodesk FTP site:

    ftp://ftp.autodesk.com/WebPub/autocad/oarx/

    Regards,

    By Blogger Fernando Malard, at 9:32 AM  

  • ...and regarding to your question about 2005 it contains features specific for 2005 so it cannot fully run inside 2004.

    Regards,

    By Blogger Fernando Malard, at 9:34 AM  

  • Hello from Italy, Fernando! My question: I’m using Architecture 2008 (i.e. AutoCAD 2007, I think), and I want to study arxprogramming. Some years ago I have bought on ebay Visual Studio .net 2002: is it the right version?

    By Blogger Antonio, at 9:17 AM  

  • Hi Antonio,

    Autodesk Architectural 2008 is based on AutoCAD 2008. Due that it requires Visual Studio 2005 without Service Pack.

    VS2002 works only for versions 2004,2005 and 2006.

    Best regards,

    By Blogger Fernando Malard, at 10:04 AM  

  • Thank you for the quick reply! So now I have a second question. I have only one official copy of AutoCAD (Architecture 2008), which I use in my professional business. I was thinking I could buy a new hard disk and install there a previous trial version of autocad, together with my visual net 2002. Is an arx2005 application compatible with autocad 2008?

    By Blogger Antonio, at 10:22 AM  

  • Hi Antonio,

    No, ARX2005 will not run inside 2007,2008 and 2009. There is a binary break. You need to recompile your code inside VS2005 and this will require your code to be UNICODE compatible.

    Basically if you need to support both 2004,2005,2006 and 2007,2008,2009 families you will need to live with VS2002 and VS2005 in parallel. In this case, I would recommend ObjectARX2004 for VS2002 and ObjectARX2007 for VS2005.

    There are some "hacks" over the Internet to avoid this problems but they are not supported by Autodesk so there is no guarantee they will not cause any problems to you.

    Sorry about the bad news.
    Regards,

    By Blogger Fernando Malard, at 10:37 AM  

  • Hello,

    I want to know if the examples which are provided in arx lib can be compiled with VS2008 ?
    Because I've tried to do this but I have the following error : "Error 8 fatal error LNK1104: cannot open file 'mfc80u.lib'"

    regards,

    William

    By Blogger Chty, at 12:41 PM  

  • Hello William,

    VS2008 is not compatible with ObjectARX 2007,2008 and 2009.

    You need to use VS2005 (without SP1) to be fully compatible with these 3 versions.

    Regards.

    By Blogger Fernando Malard, at 1:42 PM  

  • thank's for the answer, but why "without SP1" ?

    By Blogger Chty, at 6:37 AM  

  • William,

    Because SP1 make some changes into some libraries which may cause problems with AutoCAD.

    In fact you can use SP1 but ONLY with ObjectARX 2009. If you plan to build based on ObjectARX 2007 or 2008 the only supported version is VS2005 without SP1.

    Regards.

    By Blogger Fernando Malard, at 8:04 AM  

  • Hello,

    It's strange, I've been using ARX 2006 & ARX 2008 with Visual Studio 2008 without any problems. (I didn't know the requirements)

    By Blogger Chty, at 10:06 AM  

  • Hi,

    You will probably run into problems because they are not compatible. There are some hacks over the Internet but they are not 100% guarantee to work.

    Check your compiled module dependencies with the following tool:

    C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\Depends.exe

    Open your compiled ARX or DBX module inside this applicatio and check the libraries it depends on.

    Probably if you deploy your product to a machine without VStudio something will happen.

    Regards.

    By Blogger Fernando Malard, at 10:17 AM  

  • Since Microsoft Visual Studio 9.0 has been out, there isn't a depends.exe file in the subfolders.

    I copied and renamed the mfc90u.lib and the mfcs90u.lib to mfc80u.lib, and mfcs80u.lib. Then I compiled the clones objectarx sample. When I used the Arx command to load the clones.arx object, it complained of not being compatable, but went ahead and loaded it. You cannot use clone1, or clone2, but will use clone3 command correctly.

    By Anonymous rickjkelley, at 12:45 PM  

  • For the clones.arx compilation, I just copied and renamed two files needed called mfc80u.lib, and mfcs80u.lib from the latest VS 9.0 libs called mfc90u.lib, and mfcs90u.lib. Recompiled them and loaded it using the ARX command. When you load it, the message will come up saying that it is not compatable with 2007, but will load it anyway. Clone1, and clone2 seem not to work, but clone3 will. (This is the one that I was interested in anyway).

    By Anonymous Anonymous, at 12:50 PM  

  • Hello,

    I really don't recommend you to do that. The compatibility is not related only to those libraries. You may run into trouble due several changes on the MFC and CRT libraries.

    If you already have purchased the VS2008 request a downgrade from Microsoft. They probably will charge you only by the DVD mailing.

    Remember, only because it loads does not means it will work.

    Regards,

    By Blogger Fernando Malard, at 1:09 PM  

  • Hi,

    Is there any chance that this ObjectARX can work with C#?

    thank you,

    By Anonymous Anonymous, at 9:51 PM  

  • Hello,

    There is a specific .NET AutoCAD API which allows you to do almost everything you can do with C++ ObjectARX.

    In fact the way and the code itself is different and the way to use the features may also vary a little bit.

    .NET does not allow you to develop custom objects so you still need C++ ObjectARX to do that.

    Regards,

    By Blogger Fernando Malard, at 8:25 AM  

  • Hi.

    First question: Is AutoCAD 2010, ObjectARX 2010 and VS 2008 SP1 a compatible environment?
    Second: Is there any tutorial like this (ObjectARX&Dummies) for these latest versions? If not, could I use this tutorial?

    Thanks in advance and best regards

    Zix

    By Anonymous Anonymous, at 7:02 AM  

  • Hello Zix,

    Yes, to build AutoCAD 2010 compatible product you need to use ObjectARX 2010 and VS2008 SP1.

    Pay special attention to the platform (x32 or x64) which will require the proper SDK files to compile as the AutoCAD 2010 comes in two platforms too.

    This Blog's tutorials should apply to 2010 release with a few modifications due the SDK changes which you can verify at its Migration Guide.

    Try to just open the projects inside VS2008 follow VS migration wizard and try to compile. If some error appear, go to the Migration Guide and check for the corresponding changes. For the custom entity, the major problem will be the new subXXX() methods like subWorldDraw() which replaces the current worldDraw(). For that a simple #define may do the trick.

    Regards.

    By Blogger Fernando Malard, at 8:09 AM  

  • Thanks for a quick response!

    Best regards

    Zix

    By Anonymous Anonymous, at 8:28 AM  

  • Hi Fernando.

    Regarding my question about the environment: is it possible to work with VS 2008 SP1 Express Edition or it has to be full version? I have Express Edition and for example I don't have possibility to choose MFC DLL under C++ projects.

    Thanks

    Zix

    By Anonymous Anonymous, at 6:50 AM  

  • Zix,

    Express edition does not support MFC. There are some workarounds but you will need to use external resource editors, modify used libraries, etc. If you need to use it, go to the Standard version.

    Sorry about bad news.

    By Blogger Fernando Malard, at 8:07 AM  

  • Hello.

    As far as concerned these subXXX() functions from post above, what should be exactly after #define?

    thank you

    By Anonymous Anonymous, at 11:28 AM  

  • Hi,

    This will depend on the platforms you will target.

    If your product will be only focused on the 2010 you just need to replace the non-sub method by the corresponding sub. Take a look at the Migration Guide inside ObjectARX 2010.

    If you plan to target both 2010 and previous family (2007,2008 and 2009 which require a VS2005 project) you will need to create a #define to change the name of these SubXXX methods depending on the project you are compiling.

    Something like that:

    #ifdef MY_VS2005
    #define subXXX XXX
    #endif

    This way, when compiling inside VS2005 you will use the old style names and when compiling the same code inside VS2008 it will not change the names. Note that "MY_VS2005" is a pre-compile symbol you should define yourself inside the VS2005 project settings.

    Good luck.

    By Blogger Fernando Malard, at 11:55 AM  

  • Hi Fernando.

    Where is Migration Guide located? I simply couldn't find it.

    Regards

    By Anonymous Anonymous, at 5:34 AM  

  • Hi,

    ObjectARX Migration Guide:
    arxxmg.chm

    x64 Migration Guide:
    arxmgr.chm

    Both inside \ObjectARX 2010\docs

    For the previous SDKs these document's name may vary.

    Regards.

    By Blogger Fernando Malard, at 10:55 AM  

  • hi Fernando;

    I am dincer from Turkey and have a question .
    what can you say about DOTNETARX? Where can we find documents, source codes and such a blog for DOTNOTARX?

    Thank you

    By Anonymous dincer, at 8:48 AM  

  • Hello dincer,

    The best resource for ObjectARX .NET programming is this from my friend Kean Walmsley:

    http://through-the-interface.typepad.com/

    Regards,

    By Blogger Fernando Malard, at 9:38 AM  

  • Fernando,

    I have Windows 7 and I'm testing the beta version of VS2010, is there way to make it work with ObjectARX 2010? I tried it but it's now telling me:

    LINK : fatal error LNK1104: cannot open file 'mfc90u.lib'

    What do you suggest??

    By Blogger Estudiante, at 9:04 PM  

  • Hello Estudiante,

    I have not tested this environment yet but I'm afraid you will need to make some unsupported tweaks into the VS libraries.

    In regards to C#, probably it will work with VS2010.

    Regards,

    By Blogger Fernando Malard, at 10:12 AM  

  • can I use Visual C# (sharp) instead?

    By Blogger Shahid, at 5:22 PM  

  • Shahid,

    You can but only for C# programming. C++ will require Visual C++.

    Regards.

    By Blogger Fernando Malard, at 3:02 PM  

  • Hello,
    I'm using Autocad 2007 and I need to compile a program I just received. The problem is : I've been looking everywhere, I can't find any website where we can download VS2005...

    Could you help me, or tell me if it's possible to downgrade a more recent version ?

    Thanks !

    By Blogger Aurore, at 8:59 AM  

  • Aurore,

    You will need to call Microsoft and see if they can provide you VS2005/VS2008 if you buy a version of VS2010.

    If this ObjectARX application is targeting AutoCAD 2010,2011 and 2012 you should use VS2008. This will require you to convert some things inside your project.

    If you are targeting AutoCAD 2008/2009 thus you will need VS2005 indeed.

    Good luck.

    By Blogger Fernando Malard, at 8:01 AM  

Post a Comment

<< Home