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!

163 comments :

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

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!

Fernando Malard said...

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.

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

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.

Fernando Malard said...

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.

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

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?

Fernando Malard said...

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.

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

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

Anonymous said...

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

Fernando Malard said...

Hello,

Check this article from Kean Walmsley:

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

Regards,
Fernando.

Fernando Malard said...

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.

Anonymous said...

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.

Fernando Malard said...

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.

Anonymous said...

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.

Fernando Malard said...

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.

iain9876 said...

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

Fernando Malard said...

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.

Guillaume said...

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!

Fernando Malard said...

Hi Guillaume,

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

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

Regards,

Fernando Malard said...

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

Regards,

Antonio Majer said...

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?

Fernando Malard said...

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,

Antonio Majer said...

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?

Fernando Malard said...

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,

Chty said...

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

Fernando Malard said...

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.

Chty said...

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

Fernando Malard said...

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.

Chty said...

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)

Fernando Malard said...

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.

Anonymous said...

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.

Anonymous said...

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

Fernando Malard said...

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,

Anonymous said...

Hi,

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

thank you,

Fernando Malard said...

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,

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

Thanks for a quick response!

Best regards

Zix

Anonymous said...

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

Fernando Malard said...

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.

Anonymous said...

Hello.

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

thank you

Fernando Malard said...

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.

Anonymous said...

Hi Fernando.

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

Regards

Fernando Malard said...

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.

dincer said...

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

Fernando Malard said...

Hello dincer,

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

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

Regards,

Esaias Pech said...

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

Fernando Malard said...

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,

Shahid said...

can I use Visual C# (sharp) instead?

Fernando Malard said...

Shahid,

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

Regards.

Aurore said...

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 !

Fernando Malard said...

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.

Unknown said...

hello, i am compiling a proyect VC++ 6.0 for AutoCad 2012 with VS 2010 and ObjectARX 2012, the ARX loads ok, but the commands do not work, i list th commands and the names are in Chinesse characters, help me please
PD: Too Im try to compile it in VS 2008 SP1 and ObjectARX 2010 with same result...

Fernando Malard said...

Miguel,

Did you try to encapsulate your string messages with the _T() macro?

"Your Message"

to

_T("Your Message")

This will use the string as UNICODE symbol.
This also requires you to port your app to UNICODE which requires some modifications described into the ObjectARX documentation.

Regards,

Anonymous said...

Hi, i get the error LNK2019: unresolved external symbol "class AcDbObjectId __cdecl createLine(class AcGePoint3d,class AcGePoint3d,char *)" (?createLine@@YA?AVAcDbObjectId@@VAcGePoint3d@@0PAD@Z)
what does it mean? how can I resolve it?

Fernando Malard said...

Did you create the project using ARXWizard?
Usually this indicates you are missing the ARX libraries or the createLine() method body is not being linked with your code.

Can you provide more details about your project?

Anonymous said...

Hello, Fernando:
how can i debug my arx with VS 2010 and AutoCAD 2012? Im trying to do it, but VS 2010 say me there is not source code available and the arx do not appear in the stack frame, I put in the start up suite...
The break points do not activate because can't load symbol for the document...
Thanks in advance

Fernando Malard said...

Hello,

Here is my checklist:

- Your code should be compiled as DEBUG;
- The main ARX module should be the current/active project at the VS project tree;
- VS2010 should have SP1 installed;
- You need to load into AutoCAD the same binary file you have just compiled in DEBUG mode;

Another thing you can try is to debug via binding. You compile your project as Debug but do not start AutoCAD from VS. Manually open AutoCAD, load your ARX module and return to VS. There, into the Debug menu, you will find ATTACH command which will show you a dialog with current running processes including acad.exe. Select this process and it will dynamically bind your source code with the runtime DLL.

Please let me know if any of these tips did solve your problem.

Best regards,

Anonymous said...

Hi Fernando!
Well, i have installed SP1, now i'm trying to compile with DEBUG but i get the error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: char * const & __thiscall std::_Vector_const_iterator >::operator*(void)const " (??D?$_Vector_const_iterator@PADV?$allocator@PAD@std@@@std@@QBEABQADXZ)
Without DEBUG all is ok!
I have these libraries in linker input:
acad.lib
acapp.lib
acismobj18.lib
AcMPolygonObj18.lib
acui18.lib
adui18.lib
AdApplicationFrame.lib
aseapi18.lib
asiapi18.lib
acdbmgd.lib
acge18.lib
acgiapi.lib
acdb18.lib
axdb.lib
odbc32.lib
odbccp32.lib
rxapi.lib

Fernando Malard said...

Hello,

Have you checked if your _DEBUG symbol is being properly handled into StdAfx.h?

As this symbol affects how MFC libraries are compiled you need to wrap the includes with a #if statement like this example (see how the BOLD definitions wrap the includes):

_________________________________


#if defined(_DEBUG) && !defined(AC_FULL_DEBUG)
#pragma message("Building debug version of this module to be used with non-debug/Prod AutoCAD")
#define DEBUG_THIS_ONLY
#undef _DEBUG
#endif


#pragma warning(disable: 4275)

#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers

#include // MFC core and standard components
#include // MFC extensions

#ifndef _AFX_NO_OLE_SUPPORT
#include // MFC OLE classes
#include // MFC OLE dialog classes
#include // MFC OLE automation classes
#endif // _AFX_NO_OLE_SUPPORT


#ifndef _AFX_NO_DB_SUPPORT
#include // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT

#ifndef _AFX_NO_DAO_SUPPORT
#pragma warning(push)
#pragma warning(disable:4265)//disable missing virtual destructor warning
#include // MFC DAO database classes
#pragma warning(pop) // C4265
#endif // _AFX_NO_DAO_SUPPORT

#ifndef _AFX_NO_AFXCMN_SUPPORT
#include // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include
#include "AcadStdafx.h"


// Turn on the _DEBUG symbol if it was defined, before including
// non-MFC header files.
//
#ifdef DEBUG_THIS_ONLY
#define _DEBUG
#undef DEBUG_THIS_ONLY
#endif


Hope it helps you.
Regards,

Anonymous said...

Hi, Fernando: I get this error trying to write xdata to an acad object: Unhandled Exception in 0x76e82cc7 in acad.exe: 0xC0000005: Access violatios reading at 0x289ee5bf. Funny thing that sometimes fails and sometimes not!
WHat may be happenning??
Thanks in advanced...

acdbRegApp(XDataName);
pRb =acutNewRb(AcDb::kDxfRegAppName);
AcDbObjectId objId;
AcDbEntity *pEntity;

if (acdbOpenObject(pEntity, objId, AcDb::kForWrite, false) != eOk)
acedAlert(_T("Error: Can´t open object!"));
else {
pEntity->upgradeOpen();
if (pEntity->setXData(pRb) != Acad::eOk)
acedAlert(_T("Error: Can´t add XData!"));
pEntity->close();
acutRelRb(pRb);
}
Sometimes fails in pEntity->setXData and sometimes fails in pEntity->close()

Fernando Malard said...

Hello,

The problem seems to be related to the upgradeOpen() method call.
This method is only intended to be used when you have an entity opened for READ and want to enable WRITE capability to it.

At your code you opened the entity for WRITE so you don't need to call upgradeOpen(). As a matter of fact, the ideal scenario would be changing the open to READ and keep the upgradeOpen() call.

Note that every open operation in WRITE mode will trigger a lot of reactors inside AutoCAD database so it is way slower than a READ open. Only use WRITE mode when you are sure the entity is going to be changed. If any test needs to be done prior to the modification you can do the test in READ mode.

Another minor issue is that your call to acutRelRb(pRb); is inside the ELSE so if your entity cannot be processed the resbuf is not being cleaned up. The following two calls in your code:

acdbRegApp(XDataName);
pRb =acutNewRb(AcDb::kDxfRegAppName);

...should be inside the IF because if you don't open the entity why use them anyway?

Hope it will fix your strange behavior.

Best regards,

Anonymous said...

Hello, Fernando!
I get this error executing an arx application: Unhandled Exception 0x77303873 in acad.exe: 0xC0000374: This in free.c in:
#endif /* _WIN64 */
{
retval = HeapFree(_crtheap, 0, pBlock); // Here the error

if (retval == 0)
{
errno = _get_errno_from_oserr(GetLastError());
}
}

What is can be it??

Anonymous said...

Hi Fernando!

I changed my code just you say and the exception error still be present.
NOw, fails in acutRelRb() function too:
Unhandled Exception in 0x0f477750 in acad.exe: 0xC0000005: Access violation reading at 0x0000001a.
It will be problem with AutoCad, MSVC++ or ObjectARX, or other anything???

Fernando Malard said...

Hello,

To better understand the problem I need more info about your installed software and versions.

What version of VS are you using?
Does it have the latest updates?
What version of AutoCAD and ObjectARX?
Is it 64bit, 32 or both?

Thank you,

Anonymous said...

Well, i´m using Visual Studio 2010 Sp1, ObjectArx 2012, Autocad 2012 SP2 in win 7 Ultimate SP1 32 bits

Fernando Malard said...

Ok,

Without seeing your complete code is difficult to point the cause of your exception.

As the method acutRelRb() is responsible for deallocating the memory used by a resbuf object.

Not sure how you created your VS Project but if it was done manually check the Project type: /MT
(Multi-threaded) as opposed to /MD (Multi-threaded DLL). You need to use the latter.

Try to improve your debug exception range by enabling some additional exceptions at the Debug > Exceptions... dialog. Debug your app and when ready to call your command go back to VS and enable some additional exceptions (remember to reset them after you finish the debug with the RESET button). More info about it here:

http://truncatedcodr.wordpress.com/2011/04/04/visual-studiodebugexceptions/

If none of those things worked, try to create a new blank project with ARXWizard and test portions of your code there to validate each routine.

Sometimes in AutoCAD an object left opened will crash later when you reuse it or its container so the code line where the crash occurred doesn't necessarily mean that the problem is there.

Tell me how it turns out.

Regards,

Anonymous said...

Hi

Wonder if you can advise on how to get AutoCAD 2009 working with VS 2010?

I also have VS2008 installed but obviously I wish to use 2010 if possible.

Regards
Malcom

Fernando Malard said...

Malcom,

Did you check this article I published some time ago?

http://arxdummies.blogspot.com.br/2010/04/visual-studio-2010.html

Regards,

Anonymous said...

HI, Fernando!
Is There some way to call a lisp function from an ARX??

Thanks!

Fernando Malard said...

Hello,

Basically you can send commands to AutoCAD as LISP expressions.

There are several ways to do it but it will depend on what exactly you want to do.

Take a look at this article:

http://through-the-interface.typepad.com/through_the_interface/2006/08/techniques_for_.html

Note that once you register your own command it can be called the same way AutoCAD native commands can.

Regards,

Anonymous said...

Hi, Fernando!
Well, really i want to call a function in C++ code from visual lisp code...

Fernando Malard said...

Hello,

Once you register your function command using acedDefun() it will be callable from AutoLISP.

If you are using ARXWizard the "C>" button will show the command registration dialog where you can do that by adding your command at the lower list.

Hope this help,

Anonymous said...

HI, Fernando!
how can i create a 3dface in ObjectARx??

Thanks...

Fernando Malard said...

Just use the AcDbFace class:

__________

AcDbFace(
const AcGePoint3d& pt0,
const AcGePoint3d& pt1,
const AcGePoint3d& pt2,
Adesk::Boolean e0vis = Adesk::kTrue,
Adesk::Boolean e1vis = Adesk::kTrue,
Adesk::Boolean e2vis = Adesk::kTrue,
Adesk::Boolean e3vis = Adesk::kTrue
);

Parameters:

const AcGePoint3d& pt0
Input first corner point (in WCS coordinates)
const AcGePoint3d& pt1
Input second corner point (in WCS coordinates)
const AcGePoint3d& pt2
Input third corner point (in WCS coordinates)
Adesk::Boolean e0vis = Adesk::kTrue
Input Boolean indicating whether or not first edge will be visible
Adesk::Boolean e1vis = Adesk::kTrue
Input Boolean indicating whether or not second edge will be visible
Adesk::Boolean e2vis = Adesk::kTrue
Input Boolean indicating whether or not third edge will be visible
Adesk::Boolean e3vis = Adesk::kTrue
Input Boolean indicating whether or not fourth edge will be visible

Description:

This constructor initializes the AcDbFace to use the points pt0--pt2 as the four corner points of the face with pt2 being used for both the third and fourth corner points. This produces a face that is triangular. The points must be in WCS coordinates.

The e0vis--e3vis arguments control the edge visibilities. e0vis controls the visibility of the edge between pt0 and pt1, e1vis the edge between pt1 and pt2, etc. An Adesk::kTrue value indicates the edge is to be visible. An Adesk::kFalse value indicates the edge is to be invisible.

In addition, standard AcDbEntity initialization occurs.
__________

Regards,

Anonymous said...

i get the error "an unhandled win32 exception ocurred in ACAD.EXE [xxxx]" when i run my ARX aplication. Before all were fine, and some time after this is what happening...i dont understand it! Help me please!

Fernando Malard said...

Hello,

I would need further information to help you.
Things like:

- AutoCAD version
- Windows platform: 32 or 64?
- Visual Studio version

Further, can you put a breakpoint into the code and detect which line is causing the Exception?

Regards,

Anonymous said...

Well...
Windows 7 32 bit SP1
AutoCad 2012 SP2
VS 2010 SP1
And the module of the error is free.c:

#endif /* CRTDLL */
else // __active_heap == __SYSTEM_HEAP
#endif /* _WIN64 */
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0) //Here
{
errno = _get_errno_from_oserr(GetLastError());
}
}
}

Fernando Malard said...

Ok, so you are running a 32-bit machine.

Further questions:

- AutoCAD 2012 requires VS2008 engine to compile. Did you set the Platform Toolset:

Project Setting > Configuration Properties > General: Platform Toolset = Visual Studio 2008 (v90) ?

- Did you port your code to x64? If you, are you keeping different Builds for each Platform (Win32/x64)?

- Are you including the proper Headers/Libraries from ObjectARX for each Platform version?

- Are you instantiating non-ARX classes into one DLL and trying to delete them into another DLL?

- Can you debug your code since kLoadAppMsg inside acrxEntryPoint.cpp and check the last code line executed before the exception it thrown?

Regards,

Anonymous said...

Well Fernando:

The platform toolset is v90, i have installed VS 2008 and i am building only for win32, i dont delete classes in diferent dlls, i noted that while in debugger, if i continue till end skipping the error, at second try, the error disapears...

Fernando Malard said...

Can you create a new empty project with the portion of the code is raising the exception or is it too complex to isolate?

BTW, are you deleting a point to an entity you just added to database and called close()? Remember that Database resident objects cannot be deleted.

It is difficult to further troubleshoot the problem without seeing or running the code...

Anonymous said...

Well, i cant isolate that code, but if before all its ok, and now its malfunction, what can it be??
NET Framework? Before: 4.0 Now: 4.5
U believe it can be?

Fernando Malard said...

Probably not.

Try this:

- Compile your code in Debug mode;
- Once it is built, Start de Debug process (F5);
- Let AutoCAD initialize its things and don't load your DLL;;
- Go back to Visual Studio screen, menu DEBUG, click Exceptions...;
- Into the Exceptions dialog, enable all itens at the Thrown column;
- Go back to AutoCAD and load your app;
- You should see a lot of exceptions being thrown. Pay special attention to those thrown by your own code.

This option will catch more exceptions than usual and could help you to find the real culprit.

Don't forget to go back to the Exceptions dialog after you finish and restore the configuration using the "Reset All" button.

Hope it helps you to identify the problem.
Let me know how it goes.

Regards,

Anonymous said...

Hello Fernando!
The function where the error produces is in:
free(Word);
where Word is a pointer to char string...
i'm trying to liberate the memory, it's necessary???

Fernando Malard said...

Hi,

It depends on two things:

- How you allocated the memory for it;
- What you did with that string;

If you need to manipulate a simple local string you know the necessary buffer size to handle, just use:

char buffer[1024];

In this case you don't need to free the memory once it will be a stack variable and will be deleted when the code get out of scope.

In other hand, if you declare as a pointer instantiated with the NEW operator, you need to DELETE it. So, in this case:

char *p = new char[200];
delete[] p;

Finally, if you are dealing with a string returned by an AutoCAD native method you need to read the method documentation to check if the string returned should be deallocated by the caller. Once ObjectARX has its own heap management you will need to use acutDelString() method to do that.

free() method is used together with malloc() method a legacy C string memory management mechanism.

If you plan to port your code later to UNICODE and x64 machines I would recommend to port all your strings to TCHAR or ACHAR and use their corresponding UNICODE string manipulation Macros (_tcscpy, _tcsdup, etc.).

If you need to stay into the pure C world, take a look at the std::string class from Standard C++ Library: http://www.cplusplus.com/reference/string/

Here is a good reading about all those type of strings:

http://www.codeproject.com/Articles/2995/The-Complete-Guide-to-C-Strings-Part-I-Win-Chara

Hope it clarifies you and help with the exception.

Regards,

Anonymous said...

Well, only i deleted the line because it isn't necessary and all go ok again!
Thanks by ur help!

Fernando Malard said...

Glad it worked!

Regards,

Anonymous said...

Hello, Fernand!
i try to modify a pline adding two vertex, and only adds one...im passing the list ok to entmod, something do not function here! Always i have problems with entmod...

Help!

Fernando Malard said...

Hello,

I'm sorry but I'm not an expert in AutoLISP.

A quick Google Research gave me this URL: http://www.lee-mac.com/addpolyvertex.html

Hope it helps.

Regards,

Anonymous said...

Hello!

I compiled an arx project x64 in VS2010 for autocad 2012, and when im loading in Autocad it says me: Unable to load arx file.

Help me!

Fernando Malard said...

Hello,

- Did you compile your code with ObjectARX 2012 version?

- Did you install the VS2010 updates?

- Is your machine x64?

Regards,

Anonymous said...

Hello Fernando!

Im using this:

- x64 machine
. objectarx 2012
- autocad 2012
- vs2010

I just be wanting vs2010 updates...


Anonymous said...

Hello Fernand!

im using next:

- Autocad 2012
- ObjectARX 2012
- VS2010
- NET Framework 4.5
- Machine X64

WHat updates are necessary for VS
2010?

Thanks

Fernando Malard said...

Hello,

Just use Windows Updates or go to Microsoft website.
My VS2010 version is:

"10.0.40219.1 SP1Rel"

Another thing you can do is to install Depends which is a helper tool to scan your DLLs (ARXs/DBXs) que tell you the other DLLs it depends on and which symbols it is expecting to link with:

http://www.dependencywalker.com

Hope this helps.

Regards,

Anonymous said...

Hello, Fernando:

I run the Dependency Walker and these are the items it detects:

- MSVCP100.DLL
- MSVCR100.DLL
- KERNEL32.DLL

Can u explain me what does it mean??

Thanks

Anonymous said...

Hello, Fernand!

The message from Autocad is:

acrxGetApiVersion not found in module.arx

Make sure the app links with rxapi.lib and export the symbol.AcRxDynamicLinker
failed to load module.arx

Fernando Malard said...

- Is this a new project you created manually?
- Did you try to create a simple empty project with ARXWizard and load it into AutoCAD 2012?

It seems your project settings are incorrect.

Regards,

Anonymous said...

Well Fernando:

It´s a existing project compiled in 32 bits, only i want to recompile for 64 bits...

Greetings

Fernando Malard said...

It seems there is a problem with your .DEF file.

Inside it you .DEF file (if it does exist) you should have:
_________________________________________

LIBRARY "YOUR_ARX_MODULE_NAME"

EXPORTS
acrxEntryPoint PRIVATE
acrxGetApiVersion PRIVATE

_________________________________________

Inside your Project Settings, this DEF file should be placed into the field "Module Definition file" inside Configuration Properties > Linker > Input

Take a look at the ObjectARX samples.

Hope it solves your issue.

Regards,

Anonymous said...

Hello Fernando:

I'll get easier, I load the arx achieved but still tells me it's incompatible with this version of Autocad. Despite that works so well...

Greetings

Fernando Malard said...

Sometimes projects migrated over and over start to present strange behavior due the Visual Studio upgrade process combined with ObjectARX changes.

I would recommend you to create a new project using ARXWizard. Give it the same name as the one you have and then copy your specific code modules to this new project.

This usually cleanup the mess and allow you to start fresh.

Regards,

Anonymous said...

Hello, Fernando!

i want to compile a project arx for AutoCad 2014 and win 64 bits, what visual studio, objectARX and NET Framework i need?

Greetings

Fernando Malard said...

Hello,

- AutoCAD 2013 and 2014 (and verticals): ObjectARX 2013 and VC.NET 2010 (10.0).

- If you plan to develop only for AutoCAD 2014 you can use the ObjectARX 2014 SDK.
- AutoCAD 2014 uses .NET 4.0
- You can build with VS2012 as long as you have VS2010 installed so you can use its Platform Toolset as "V100".

Regards,

Anonymous said...

Hello, Fernand!

What does it mean "error LNK2001: extern symbol not resolved..."

greetings

Fernando Malard said...

This LINK error probably is related to a class you declared but didn't defined OR a class you included but didn't add its corresponding Library to the link input.

As you have to do with ObjectARX classes where each group of .H files will require a set of LIB files the same requirement is valid for your own code or any other Library you are consuming.

Check the Build output...you will see the missing class or method Library there.

Regards,

Anonymous said...

Hello Fernando:

What does it mean this:

error LNK 2019:extern symbol _imp_CrtDbgReportW not resolved..."

what lib i may use to resolve this?

Thanks in advanced

Fernando Malard said...

Your project settings are probably incorrect.
I would recommend you to create a new project using the ARXWizard and compare the default settings with yours.

This error has to do with MSVCRT or you have a _DEBUG symbol defined at a Release build.

Don't start to guess the settings and play with them until they work because it may fix one error and create another.

Try to follow the standards recommended by the ARXWizard projects and just change them if you really need to.

VS Project Settings are tricky and this is why ARXWizard uses now .props file which are predefined recommended settings.

Going further, if you are using VS2012 to generate AutoCAD 2013/2014 modules you need to have VS2010 installed and use v100 Platform toolset at your project settings.

Really difficult to say without seeing the whole project...

Anonymous said...

Hello Fernand!

i compiled a arx project in a machine 64 bits but when i run AUtoCAD 2014 crash and halt, the debugger says there is a problem with ntdll.dll, an unhandled exception ocurred, damaged ocurred in a pile, or something...
what can i do?
VStudio 2012, ObjectARX 2013

Greetings

Fernando Malard said...

Hello,

There are so many potential causes.
You need to debug the code and check each step looking for corrupted pointer addresses, null pointers, or anything that could be crashing AutoCAD at runtime.

Error messages thrown by AutoCAD aren't much clear and precise about the real error.

Regards,

Anonymous said...

Hello, Fernand!
i can´t debug a project:
Error message: the break point do not activates, can´t load any symbol for this document!

VS 2012 v. 11.0 Update 4
AutoCad 2014
ObjectARX 2013

Help!

Anonymous said...

Hello Fernand!
I get these warnings when i compile an Arx project:

1>rxapi.lib(libinit.obj) : warning LNK4099: Not found PDB 'rxapi_cl.pdb' with 'rxapi.lib(libinit.obj)' or at 'C:\Project\Debug\rxapi_cl.pdb'; the object will be linked regardless debugging information

1>rxapi.lib(nullobid.obj) : warning LNK4099: Do Not found PDB 'rxapi_cl.pdb' with 'rxapi.lib(nullobid.obj)' or with 'C:\Project\Debug\rxapi_cl.pdb'; the object will be linked regardless debugging information

i can not debug because of this.

i have:
windows 7 64 bits
VS 2012 update 4
AutoCAd 2014
ObejctARx 2013

Fernando Malard said...

Hello,

Usually it means you are loading a different binary file into AutoCAD that doesn't match the source code you are trying to debug.

Other potential reason is the Fiber mode. FIBERWORLD variable will show the current state of Fibers and NEXTFIBERWORLD will allow you to change it for the next time you open AutoCAD.

Take a look at this post from Kean:

http://through-the-interface.typepad.com/through_the_interface/2011/09/no-source-available-when-debugging-an-autocad-plug-in.html

Hope it helps.

Fernando Malard said...

Hi,

These warnings are safe to ignore because you don't have the AutoCAD Debug version at your machine. Take a look at the other reply I answered you to try to get the debug to work.

Regards.

Anonymous said...

Hello Fernand,

im loading the correct arx and i set to 0 the nextfiberworld variable, but the problem is coming from the compilation process, because of the warnings before i described, the compilation do not generates debug information...

Thanks for ur time!


Fernando Malard said...

Hello,

The warnings are ok and they will only block you to step into AutoCAD specific source code, Your own code breakpoints should work.

Another think you may check is the Debug mode of your Project Settings.

Go to Project Settings, Configuration Properties, Debugging.

At the field Debugger Type, make sure you set "Auto" so Visual Studio can select the appropriate mode depending on your module type.

Regards.

Anonymous said...


Well, my breakpoints do not work and the debugger type is AUto already. These warnings never had appeared before. Only in the x64 machine with VS 2012, Autocad 2014 and Objectarx 2013, which of these will be the cause? THat is the cuestion...according to the warning the rxapi.lib is the problem, i had copied again the objectarx 2013 files and the problem continues..

Fernando Malard said...

Is there a .PDB file with the same name of your target sitting at the same folder where is binary output is?

Anonymous said...

Hello, Fernand!

Can i compile an ARX project for an OS 32 bits pc in an OS 64 bits pc?

Fernando Malard said...

Yes, you can. You just need to use the appropriate ObjectARX Headers/Libraries for 32-bit.

Note that it also involves different project settings in Visual Studio so you will end up having different configurations for 32 and 64-bit.

Regards.

Temoc said...

Hello Fernando
I have Visual Studio Express 2012 instaled and ObjectArx 2015 SDK,
I have the SDK samples compiled successfully but when i try to load i get this message
ents.arx is incompatible with this version of AutoCAD.
AcRxDynamicLinker failed to load 'c:\objectarx\samples\database\ents_dg\debug\ents.arx'
C:\Program Files\Autodesk\AutoCAD 2015\acad.exe

Fernando Malard said...

Hello Temoc,

Did you check the Platform configuration?
You cannot load 32-bit apps in AutoCAD 64 and vice-versa.

Regards,

Temoc said...

Thanks Fernando now works fine, now i'm triying to make a project template but when import i get an error message "confirm that the path in the declaration is correct".

Fernando Malard said...

Difficult to say without seeing your project.
One thing you can check is how your paths are configured into the Project Settings page.
Now the project paths are specific per project and should be bound to the specific Platform 32/64 and their paths.

Regards,

Anonymous said...

Hello, Fernand!

i can not debug my arx, AUtoCad 2014 64 bits hangs and VS 2012 says PDB file can not open or found!

Help me!

Fernando Malard said...

Assuming you compiled your code in DEBUG mode, Visual Studio will look for acad.pdb file which is not available. It should be a warning message only and you can hit ok then continue with the debugging process.

If it is not the case, check your Project Setting under Debug mode to assure the PDB creation option is turned on. If you are not sure about the correct project settings I would recommend you to create a new empty ARX/DBX project using Autodesk ARXWizard which will provide the optimum project settings for you.

Regards,

Anonymous said...

These warnings are present too:

Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031aa88.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031aa88.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031c978.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031d378.
Primera excepción en 0x000007fefddcaaad en acad.exe: Excepción de Microsoft C++: FNPNS::TSM::CDoesNotExistException en la ubicación de memoria 0x0031ca68.


The DeBUG mode is on

i can not create an ARX project with the ARXwizard, it does not works properly...

Help!

Anonymous said...

I believe is relationed to this warning:

Warning 25 warning LNK4099: Do not found PDB 'rxapi_cl.pdb' with 'rxapi.lib(libinit.obj)' or in... ; It will link the object without debug information...

at time of compilation.

i'm right?

Thanks for ur help!


Fernando Malard said...

This warning is just telling you there isn't Debug information into the library which is expected once it is a RELEASE library provided by Autodesk into the ObjectARX SDK. You can safely ignore it.

Your error is too generic.
Did you try to simply compile one of the samples inside ObjectARX\Samples\ folder?
They should compile and run just fine as long as you install your SDK at the C:\ drive (the default install folder).

Regards,

Anonymous said...

Hello, Fernand!

How can i justify a text?

Thanks

Fernando Malard said...

Take a look at AcDbText and AcDbMText classes. You have methods to control justification and alignment there.

Regards,

Anonymous said...

Where can i look for these? VS Help online is a headache!

Fernando Malard said...

You can download the SDK documentation from: www.objectarx.com

Once installed, you will find the arxref.chm file under C:\ObjectARX 2015\docs\.
This is a Windows Help file where you can find detailed documentation about the entire API.

Regards,

Anonymous said...

Hello, Fernand!

i have this code:

xText->setJustification(AcDbText::kTextAlignmentMiddleCenter);

the case is text loses his coordinates X and Y and moves to 0,0

i remove the line and text is ok!

Help!

Fernando Malard said...

Not sure I understood your question.
Can you provide more details about the issue?

Anonymous said...

Fernand:

You can put an example of code to justify a text, where i can see the steps?

Because i do not understand where is the error in this line:

xText->setJustification(AcDbText::kTextAlignmentMiddleCenter);

this changes his insertion point (X, Y), the text is put in other place

Thanks!

Fernando Malard said...

Take a look at these methods:

Acad::ErrorStatus setAlignmentPoint(
const AcGePoint3d&
);

Acad::ErrorStatus setVerticalMode(
AcDb::TextVertMode
);

Acad::ErrorStatus setHorizontalMode(
AcDb::TextHorzMode
);


I don't have an example to provide but I believe the call to setAlignmentPoint() will solve the odd behavior.

Regards,

glavoc said...

Hi Fernando,

I'm using x64 system and x64 AutoCAD 2014.
I'm trying to get objectarx to work in VS2015, but I don't know is it possible to get platform toolset to v100 for x64 platform.
Do I have to get VS2010 Professional to get x64 platform?

Thank You

Fernando Malard said...

Hello glavoc,

Yes, you will need to instal VS2010 to turn on the appropriate platform toolset in VS2015.
I never tested VS2015 with AutoCAD 2014 but with the toolset it should work just fine.

Regards.

Anonymous said...

hELLO, fERNAND!

i can not debug my arx in Autocad 2014, VS 2012, x64 machine. When i try to associate the AutoCad.exe process messages as next appear:

ntdll.dll C:\Windows\System32\ntdll.dll N/A N/A No se puede encontrar o abrir el archivo PDB. 2 10.0.10240.16384 (th1.150709-1700) 07/08/2015 11:20 p. m. 00007FFBD3610000-00007FFBD37D1000 [4180] acad.exe: Nativo

AcdbMgd.dll C:\Program Files\Autodesk\AutoCAD 2014\AcdbMgd.dll Sí No Carga de símbolos omitida. 2 19.1.108.0.0 30/08/2013 05:36 p. m. 00007FFBA7DC0000-00007FFBA8B14000 [4180] acad.exe: Administrado (v4.0.30319)

Thanks in advanced


Fernando Malard said...

Hello,

AutoCAD 2014 requires the code to be compiled with VS2010 engine.
Probably the debug process will be affected by this setting as well.

Further, when attaching to a running process, check:

- Debug mode set to "Native code Only"
- AutoCAD set with Fibers turned off > "NEXTFIBERWORLD" variable set to 0

Try also to start the debug process from VS with F5 option.
Less possible but you should check, make sure the source code you are debugging matches the one you have loaded into AutoCAD.

Regards,

Anonymous said...

Hi Fernand!
I need to compile an ARX app to AutoCad 2018, i have VS2015 installed, do i need vs2013 engine for compile?
thanks in advanced

Fernando Malard said...

Hi, you shouldn't:

AutoCAD 2018: ObjectARX 2018 and VC.NET 2015 (14.0 - Update 3);

Anonymous said...

vs2015 14.0 update 3 is same vc.net 2015 14.0 update 3?

Fernando Malard said...

VS2015 = Visual Studio 2015 which comes with VC.NET 2015.

Anonymous said...

ok, can i compile this arx for win7?

sorry too questions...

Fernando Malard said...

The ARX itself should run ok in Win7 as long as AutoCAD 2018 can also run.
I have never tried this though.

Anonymous said...

HI, Fernand...

i mean if i can compile with VS2015 for Win7, because the targeting platform only appears me windows 8.1 option and when compiling there are many errors of types in include files of VS2015...will have to do with this?

thanks

Fernando Malard said...

AutoCAD 2018 requires Win7 SP1.
VS2015 should work but maybe you are using the incorrect SDK in terms of 32/64 bits.
Have you checked that?

Anonymous said...

good morning Fernand!

i have Active(win32) in platform project property or where i must check?

thanks

Anonymous said...

Goog night Fernand!

i found the solution adding Common Tools for C++ but now have sintax errors in objectarx inc headers files, how can be it possible?

help!

Fernando Malard said...

Did you checked if your include/library VS project paths are pointing to the correct 32-bit folders within ObjectARX SDK?

Anonymous said...

Hi, Fernand...

Yes, i have inc and inc32 folders as aditional include directories...

There are 21 sintax errors in aced.h...

Already i added windows.h because this is not included more in aced.h...



Anonymous said...

HI Fernand!

How much can I charge to update an arx application of Autocad 2014 to 2018?

thanks

Fernando Malard said...

Hello,

It is difficult to say. Usually you match your hour rate to C++/C# programming hours but AutoCAD does have an additional level of complexity which is the ObjectARX API.

In terms of migration, it shouldn't be that hard once 2014 was already a big move compared to 2012.
You will face the Visual Studio changes and also some ObjectARX changes that will impact your migration depending on which areas of the SDK the project has used.

Anyway, I would recommend to provide a quote per hour at least before you get a better and precise idea about the errors to be fixed.

Good luck.