Hi,
Can anyone tell me how to manually set up a project for Tool Palettes API with Object ARX and C++?
The help website says "Select ObjectARX/DBX/OMF Project to launch the wizard."
But the templates created using ObjectARX wizards (with admin rights) are not working for me. They just repeat the same template selection window when I click ok.
I'm using AutoCAD 2020.
Hi @tbrammer,
Thank you.
I'm going through the projects and I'm getting these errors and more like these. If I switch the project from x86 to x64, some cannot open errors disappear and some others #includes start showing the same error.
And MSXML error persists and the dll for it is not located in the project folder. Could you please help?
acadi.h and the other headers are located in <ARX>\inc-x64 not in <ARX>\inc.
It looks like you have to add <ARX>\inc-x64 to your project include paths. I recommend to put inc-x64 before inc.
Maybe this will already fix your problems.
AcImportXml.h looks basically like this:
#ifdef _ADESK_WINDOWS_
#ifndef AC_DO_NO_IMPORT
#import "msxml6.dll" named_guids rename_namespace("MSXML") rename("offset", "MSXMLoffset")
#else // AC_DO_NO_IMPORT
#include "msxml6.tlh"
#endif
#endif // _ADESK_WINDOWS_
Do you have _ADESK_WINDOWS_ #define'd in your project?
I switch the project from x86 to x64. Now I'm getting error for the below two and "acpi_i.h" (- no such file in directory). The rest of the #includes have no errors now. I did add inc x64 above inc folder, that seems to have no impact.
And the mxsm16.dll missing error still persists in the AcImportXml.h .
I'm just trying to compile the sample toolpallettes projects so I'm not sure if _ADESK_WINDOWS_ is defined or not. How do I go about checking that and defining if it is not?
Hi @tbrammer
So I managed to resolve the SimpleToolPalette_i.h issue. I copied the file from the project folder to inc folder or OARX.
Now the individual .cpp files compile successfully. But when building the project I get the below errors. I'm not sure what I'm missing here. Could you please let me know what I'm missing.
I do have these added in the project settings. And the "C:\Autodesk\OARX\lib-x64" folder is added to the project library location as well.
Can you build the original <ARX>\samples\editor\SimpleToolPalette_dg\SimpleToolPalette.vcxproj project?
Maybe it helps to compare the project settings of this project and yours.
Regarding the IID_s you should especially compare the MIDL settings.
All the above issues are with building the original project. I've not created another. Also I'll look into MIDL settings.
Strange. I built the ARX2020 sample "out of the box" with no problems.
Are you using the right Visual Studio Version?
Visual Studio 2017 Update 2, 15.7.5 and earlier / Platform Toolset = v141?
Do you build the project in the <ARX>\samples subfolder or did you copy it to a different directory? In this case you might include wrong headers/libs.
I've installed the following version. Will I have to re-install the 15.7.5 version?
I've checked with VS 2017 (15.9.51). Configuration Debug (also Release) x64 - no errors while build solution.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Just tried the Curve_dg. Failed to build. Not sure why these are missing
Looks like there is something missing or wrong in your VS installation.
On my system these headers are in C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt
This path is within the $(WindowsSDK_IncludePath) which is set in
Project settings->General->VC++ directories->include directories.
Note: I have only VS 2019 installed on my machine - but with the additional MSVC v141-VS 2017 C++ Buildtools.
This uses the Windows SDK 10. You might have/need a different Windows SDK 8.1. So paths may be different - i.e. C:\Program Files (x86)\Windows Kits\8.1\
This is the location for me where these header files are. and I don't
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
And I can see that the location is shown in the project settings. Still these headers are failing to open.
I've attached the list of header files in that location. Not sure if something is missing.
Note: The project I create anew and set up manually is working properly. I'm able to add commands and print in AutoCAD console. Just that the samples are not working out of the box. And I need to compile the tool palette samples to learn the tool palette API as I need to work on it. I tried to create a new project, set it up and then tried to copy the code from the sample project files to no avail.
Maybe when you installed VS, you didn't include some modules? I.e. MFC doesn't install by default in some cases
Can't find what you're looking for? Ask the community or share your knowledge.