Monday, January 31, 2005

Class 1 - Overview

Introduction

ObjectARX is an AutoCAD Runtime Extension.
With ObjectARX SDK you can build applications that will alow you to extend AutoCAD features like commands, dialog boxes, entities, objects and much more.

The ObjectARX application is actually a DLL that is loaded into AutoCAD environment and allows you to access new features as mentioned above. To be able to build these DLLs you need to follow some basic rules to setup Microsoft Visual Studio.NET environment and assert your application will respect AutoCAD requirements.

The performance of this application will be the same of native features. By the way, Autodesk uses ObjectARX to build vertical products you may already know like Autodesk MAP and Architectural Desktop, among many others.

User Requirements

Because ObjectARX is not a simple customization tool, some requirements must be observed to allow you to be able to proceed. If you don't match these requirements I would recommend you to first increase your skills and then go back to try this course.

The minimum requirements to learn at least basic ObjectARX are:
  • Basic Visual Studio.NET concepts;
  • Average C++ knowledge;
  • Advanced AutoCAD knowledge;
  • MFC (Microsoft Foundation Classes) concepts;
  • Object Oriented Techniques;

As mentioned before, this course is not intended to be a complex guide or even cover advanced features. I believe you can go further by yourself after learn the basic features and mainly the basic concepts which are the secret of ObjectARX.

I will not cover .NET Framework capabilities to make the course as much simple as I can. Once you learn and figure out how AutoCAD works from inside you will open your mind to ObjectARX capabilities and will be able to build great application!

How to use ObjectARX SDK

Once you have downloaded your copy of ObjectARX SDK and extracted it to your hard drive, you will find the following folders inside it:

\arxlabs : This directory consists of a set of labs that shows some aspects of the ObjectARX.
\classmap : This directory contains an AutoCAD drawing with the ObjectARX class hierarchy tree.
\docs : This directory contains the ObjectARX online help files.
\inc : The inc directory contains the ObjectARX header files.
\lib : The lib directory contains the ObjectARX library files.
\redistrib : This directory contains DLLs that may be required for an ObjectARX application to run.
\samples : This directory contains examples of ObjectARX applications.
\utils : This directory contains other libraries like brep for boundary representation and ObjARXWiz for the ObjectARX wizards.

ObjectARX Classes Naming

ObjectARX classes names follow the following prefix standards:

AcRx : Classes for binding an application and for runtime class registration and identification.
AcEd : Classes for registering native AutoCAD commands and for AutoCAD event notification.
AcDb : AutoCAD database classes.
AcGi : Graphics classes for rendering AutoCAD entities.
AcGe : Utility classes for common linear algebra and geometric objects.

Depending on which set of features you use in your applications you will need to use the corresponding library as follows:

AcRx : acad.lib, rxapi.lib, acdb16.lib
AcEd : acad.lib, rxapi.lib, acedapi.lib, acdb16.lib
AcDb : acad.lib, rxapi.lib, acdb16.lib
AcGi : acad.lib, rxapi.lib, acdb16.lib
AcGe : acad.lib, rxapi.lib, acge16.lib, acdb16.lib

ObjectARX Wizard

I will bypass the Visual Studio environment configuration to build ObjectARX applications. You could refer to this information inside SDK documentation. We will use on this course the Wizard provided by ADN (Autodesk Developer Network) team. It is located inside ObjectARX directory called \utils\ObjARXWiz. Inside it you will find the installation package named ArxWizards.msi.

To install this Wizard, close your Visual Studio.NET and double click the above mentioned file. Follow the steps. When finished, open Visual Studio.NET again and you will see a new toolbar.

See you on Class 2!

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 ObjectARX 2005. Most of features presented will be compatible to previous versions (I will consider release 2000 and above). Future versions will certainly present more features and class/methods will slightly change. Make sure you check the latest versions at the "What's New" section of ObjectARX User's Guide.

What you will need for AutoCAD and their verticals:
  • AutoCAD 2000,2000i and 2002: ObjectARX 2000 and VC++ 6.0;
  • AutoCAD 2004, 2005 and 2006: ObjectARX 2004 and VC.NET 2002 (7.0);
  • AutoCAD 2007, 2008 and 2009: ObjectARX 2007 and VC.NET 2005 (8.0);
  • AutoCAD 2010, 2011 and 2012: ObjectARX 2010 and VC.NET 2008 (9.0);
  • AutoCAD 2013 and 2014: ObjectARX 2013 and VC.NET 2010 (10.0);
  • AutoCAD 2015 and 2016: ObjectARX 2015 and VC.NET 2012 (11.0);
  • AutoCAD 2017: ObjectARX 2017 and VC.NET 2015 (14.0);
  • AutoCAD 2018: ObjectARX 2018 and VC.NET 2015 (14.0 - Update 3);
  • AutoCAD 2019 and 2020: ObjectARX 2019 and VC.NET 2017 (15.0 - Update 2);
* By using the lowest version of each SDK family, for example, using ObjectARX 2013 to create and run your plugins on both AutoCAD 2013 and 2014, does not guarantee it will run. It is recommended to perform a full test with all upper compatible versions.

** ObjectARX 2017 and 2018 both broke the binary compatibility so their plugins will run only on their corresponding AutoCAD target versions. It is recommended to create a specific build configuration for these versions.

*** Visual Studio 2010 and above provide the Platform Toolset capabilities allowing you to use their IDE but compile the code with previous version. Note that this is possible only if you have the corresponding platform core compiler version installed at your machine. The advantage of this feature is to be able to centralize multiple project versions into the same IDE.

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.

Further information about Microsoft Visual Studio versions (from Wikipedia):

Product nameCodenameVersion numberVersion of
cl.exe
Supported .NET
Framework versions
Supported .NET Core VersionsRelease date
Visual Studio 97Boston5.0N/AN/AN/AFebruary 1997
Visual Studio 6.0Aspen6.012.00N/AN/AJune 1998
Visual Studio .NET (2002)Rainier7.013.001.0N/AFebruary 13, 2002
Visual Studio .NET 2003Everett7.113.101.1N/AApril 24, 2003
Visual Studio 2005Whidbey8.014.002.0, 3.0N/ANovember 7, 2005
Visual Studio 2008Orcas9.015.002.0, 3.0, 3.5N/ANovember 19, 2007
Visual Studio 2010Dev10/Rosario10.016.002.0 – 4.0N/AApril 12, 2010
Visual Studio 2012Dev1111.017.002.0 – 4.5.2N/ASeptember 12, 2012
Visual Studio 2013Dev1212.018.002.0 – 4.5.2N/AOctober 17, 2013
Visual Studio 2015Dev1414.019.002.0 – 4.61.0July 20, 2015
Visual Studio 2017Dev1515.019.103.5 – 4.6.21.0-1.1March 7, 2017

Cheers!

Wednesday, January 26, 2005

Welcome

Welcome to my ObjectARX Blog.
I have decided to create this Blog to allow AutoCAD advanced users and AutoLISP / VBA programmers to get into ObjectARX world.
As it is a very complex environment I will try to be brief and clear on my explanations and present it step by step.
Hope you enjoy!