2023-11-22 12:15 AM - last edited on 2024-09-17 12:46 PM by Doreena Deng
I have returned to my edits of AC25 Add-ons for use in AC27. We skipped AC26. I have successfully modified a 25 Add-on for use in 26 and CMake. This time, I am seeing what the benefits/hassles are in going from 25 to 27.
Anyways... I have seen that "many API functions have been renamed to reflect their true purpose more accurately. The ACAPI_MigrationHeader.hpp header file eases the transition for you" .
I have also seen that "You can use the ACAPI_MigrationHeader.hpp included in the AC27 DevKit. It needs some adaptions since there are some errors in it, ..." .
So, when I
#include "ACAPI_MigrationHeader.hpp"
and build, I recieve these errors, all pointing back to the ACAPI_MigrationHeader.hpp file.
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(157,94): error C2061: syntax error: identifier 'API_PenType'
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(751,40): error C2660: 'ACAPI_ProjectOperation_Quit': function does not take 0 arguments
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_Automate.h(252,36): message : see declaration of 'ACAPI_ProjectOperation_Quit' [G:\dev\v27\JHP_Links\out\build\x64-Debug\JHP_Links.vcxproj]
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(1209,9): error C3861: 'ACAPI_GraphicalOverride_GetOverrideRule': identifier not found
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(1221,57): error C2660: 'ACAPI_GraphicalOverride_CreateOverrideRule': function does not take 1 arguments
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPinc.h(1480,36): message : see declaration of 'ACAPI_GraphicalOverride_CreateOverrideRule' [G:\dev\v27\JHP_Links\out\build\x64-Debug\JHP_Links.vcxproj]
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(1683,71): error C2664: 'GS::GSErrCode ACAPI_ElementSet_Create(GS::Array<API_Guid> *,const API_UserData *,API_Guid *)': cannot convert argument 1 from 'const GS::Array<API_Guid>' to 'GS::Array<API_Guid> *'
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(1683,34): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [G:\dev\v27\JHP_Links\out\build\x64-Debug\JHP_Links.vcxproj]
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPinc.h(5816,36): message : see declaration of 'ACAPI_ElementSet_Create' [G:\dev\v27\JHP_Links\out\build\x64-Debug\JHP_Links.vcxproj]
C:\Program Files\GRAPHISOFT\API Development Kit 27.3001\Support\Inc\ACAPI_MigrationHeader.hpp(2097,9): error C3861: 'ACAPI_Preferences_SetOldVersion': identifier not found
Build All failed.
I suspect these are errors in the actual ACAPI_MigrationHeader.hpp, as mentioned or errors in my code that utilize the migration header. But, based on a grep, the offending functions are not familiar to me as part of my code. And, try as I may, I am finding very little mention in the forum or in documentation about a solution to these 'errors'.
I did find this:
https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-further-community-access/td-p/573537
but it is not very helpful for me.
A point in the right direction or a brief explanation would be very helpful, as well as appreciated.
All the best,
Chris
Solved! Go to Solution.
2023-11-23 08:27 PM
Hi Chris,
Yes these errors are in the Migration Header. They are "reasonable easy" to fix with a bit of research. But if you don't need them in any of your project anyway, you can just comment them out or delete the offending cases/functions.
Hope that helps,
Bernd
2023-11-23 08:27 PM
Hi Chris,
Yes these errors are in the Migration Header. They are "reasonable easy" to fix with a bit of research. But if you don't need them in any of your project anyway, you can just comment them out or delete the offending cases/functions.
Hope that helps,
Bernd
2023-11-30 11:40 PM
Hello Bernd,
I will comment the offensive functions out of 'migration header.hpp' and hope for the best that they are not needed in future projects. Or maybe I will fix by then.
Thanks again for sharing,
Chris