BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

How to get further community access?

Bitwreckage
Contributor

I am struggling to update our Archicad plugin to support Archicad 27 - it seems like an issue with one or more of the header files provided in the SDK. Googling the issue, this URL turned up:
https://community.graphisoft.com/t5/Graphisoft-Technology-Preview/API-PenType-datatype-missing-in-he...

While it seemed very promising from the results page, I am not able to access the page. Says I do not have sufficient privileges to access the page.

 

Right now it feels like I've hit a brick wall in the effort to add Archicad 27 support to our product.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Noemi Balogh
Community Admin
Community Admin

Hi @Bitwreckage,

Graphisoft Technology Preview Program for this year is closed already, this is why you can't access the above mentioned page. 

 

The solution @eptar shared there was this:

Hi,

 

Since we started the migration with the beta, the mentioned header came a bit late for us, we already made the majority of these functions, and did not use it (so far).

Basically ACAPI_Interface, ACAPI_Environment, ACAPI_Database kind of functions are gone (those which had a the first parameter as some kind of ID).

What we did is searching in the inc folder for the term cutting off the "ID" part and the prefix. So for example in case of APIIo_SetProcessOnOffSwitchID we were looking for SetProcessOnOffSwitch and the majority of the required functions we could find. In the mentioned case ACAPI_Interface(APIIo_SetProcessOnOffSwitchID, bool*) became ACAPI_ProcessWindow_SetProcessOnOffSwitch(bool*)

I admit that this can take quite some time. (This is how we found the confusion around the regular and solid linking topic.)

Instead of API_PenType there is API_Pen from now on, it is not part of the API_Attribute union anymore. This is not just renaming, all the related functions are different now. So number of pens is retrieved now with the ACAPI_Attribute_GetPenNum function and there is a ACAPI_Attribute_GetPen function to get the details of a pen instead of doing these through API_Attribute structure.



Kind regards,
Noémi

Noémi Balogh

Community Expert, Admin

View solution in original post

3 REPLIES 3
Solution
Noemi Balogh
Community Admin
Community Admin

Hi @Bitwreckage,

Graphisoft Technology Preview Program for this year is closed already, this is why you can't access the above mentioned page. 

 

The solution @eptar shared there was this:

Hi,

 

Since we started the migration with the beta, the mentioned header came a bit late for us, we already made the majority of these functions, and did not use it (so far).

Basically ACAPI_Interface, ACAPI_Environment, ACAPI_Database kind of functions are gone (those which had a the first parameter as some kind of ID).

What we did is searching in the inc folder for the term cutting off the "ID" part and the prefix. So for example in case of APIIo_SetProcessOnOffSwitchID we were looking for SetProcessOnOffSwitch and the majority of the required functions we could find. In the mentioned case ACAPI_Interface(APIIo_SetProcessOnOffSwitchID, bool*) became ACAPI_ProcessWindow_SetProcessOnOffSwitch(bool*)

I admit that this can take quite some time. (This is how we found the confusion around the regular and solid linking topic.)

Instead of API_PenType there is API_Pen from now on, it is not part of the API_Attribute union anymore. This is not just renaming, all the related functions are different now. So number of pens is retrieved now with the ACAPI_Attribute_GetPenNum function and there is a ACAPI_Attribute_GetPen function to get the details of a pen instead of doing these through API_Attribute structure.



Kind regards,
Noémi

Noémi Balogh

Community Expert, Admin

Bitwreckage
Contributor

Thank you, Noémi! 

 

I have already started down a path of migration now, which is time-consuming, but at least I am moving forward.

The quoted answer you supplied gave me further confirmation that I am probably on the right path. Specifically the subject of API_PenType to API_Pen I think is valuable info also when trying to figure out what to do about API_PenIDs currently referenced in our code, but which does not seem to be a thing in AC27.

 

-- 

 

Kind regards

Steffen Skov

 

Hi Steffen,

 

Just one general tip for AC27 Migration in case you are not doing that anyway: You can use the ACAPI_MigrationHeader.hpp included in the AC27 DevKit. It needs some adaptions since there are some errors in it, but for me the migrations were simplified a lot by using it. For example I changed all the function definitions to inline for easier including.

Also something that tripped me up a bunch was forgetting to include the module "CADInfrastructureBase". It seems to be necessary in more situations since AC27.

Hope that helps,
Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: Archi-XT.com
Learn and get certified!