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

cannot open source file "ADBAttributeIndex.hpp"

RAFD
Participant

Need help about this errors

RAFD_0-1718083544478.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
LChen
Graphisoft
Graphisoft

You can check new document or refer Examples code to find the changes then modify your code and solve the error one by one for AC27. For example, API_PenType is not used in AC27, you can find Example code in Attribute_test.cpp

HTH  

 

View solution in original post

12 REPLIES 12
RAFD
Participant

I'm trying to upgrade the add-on to AC27 but I got errors while building the add-on

LChen
Graphisoft
Graphisoft

Hi,

The file is in the following folder of API kit:

"\Support\Modules\CADInfrastructureBase\"

so please check whether you've added the path in your VS project settings.

 

HTH

I added the path but instead of fixing it from 9, I got 89 new errors. But the previews errors are gone. Does this error have to do with the API devkit? Because in version 26 it works fine.

LChen
Graphisoft
Graphisoft

Please try to add the path into your VS project Include Directory like below:

2024-06-11_15h22_12.png

RAFD
Participant

Got it. But new errors appears

RAFD_0-1718089364245.png

 

LChen
Graphisoft
Graphisoft

From AC27, many of function names has been changed, so you need to modify your code. here is a header file for your reference. You can also check the API27 documentation about the changes.

RAFD
Participant

Can you tell me more about this "ACAPI_MigrationHeader.zip"? How will I know the correct name to use?

LChen
Graphisoft
Graphisoft

You can search the keyword then find the new name in this header file. for example,  

APIDb_GetCurrentDatabaseID
the new function will be
ACAPI_Database_GetCurrentDatabase()
or try to include this header file into your old C++ file, but I don't want to suggest this way.
 
HTH
RAFD
Participant

I tried including the ACAPI_MigrationHeader.hpp and now all my errors are in that file

RAFD_0-1718164999897.png