Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

ACAPI_MigrationHeader.hpp

MudratDetector
Enthusiast

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

Chris Gilmer
Intel i9-12950HX CPU @ 2.30GHz, 16 cores
NVIDIA GeForce RTX 3080
48.0 GB RAM
Windows 10 Pro 64-bit
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

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

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: Archi-XT.com

View solution in original post

2 REPLIES 2
Solution

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

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: Archi-XT.com
MudratDetector
Enthusiast

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

Chris Gilmer
Intel i9-12950HX CPU @ 2.30GHz, 16 cores
NVIDIA GeForce RTX 3080
48.0 GB RAM
Windows 10 Pro 64-bit

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!