We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

New Developer - Can't Build Examples (API DevKit)

Anonymous
Not applicable
Hello,
I have installed the API Dev Kit 18.3006 and Visual C++ 2005 and 2017. However I don't actually know how to build examples in order to use an Add-on on Archicad 18. In the end, I'd like to get some informations from walls in order to generate an objet from those informations. I have read a lot of topics in this forum and I understand what to do with the .apx file but I can't generate it.
Can anyone help me ?
Thank you.
9 REPLIES 9
Akos Somorjai
Graphisoft
Graphisoft
Cedric wrote:
Hello,
I have installed the API Dev Kit 18.3006 and Visual C++ 2005 and 2017. However I don't actually know how to build examples in order to use an Add-on on Archicad 18. In the end, I'd like to get some informations from walls in order to generate an objet from those informations. I have read a lot of topics in this forum and I understand what to do with the .apx file but I can't generate it.
Can anyone help me ?
Thank you.
Hi Cedric,

You should use VS 2010 for ARCHICAD 18 add-ons, all the example projects are for that version. From ARCHICAD 21 we use VS 2015.
Also, you have to put a valid MDID (use the AddOnAdmin tool in the devkit to generate one) into the .grc file, otherwise you'll end up with an .apx that can be loaded only in the demo version of ARCHICAD.

Best, Akos
Anonymous
Not applicable
Thank you for your answer.

I downloaded Visual C++ 2010 Express. When I double click on the project, Nothing happens. I tried to open it directly in VS but i got this error message :

"Platform 'x64' referenced in the project file 'Panel_Test' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'"

They tell me to use the x64 configuration in the Configuration Manager but there is only the x32. I can't find it.

Do you have an idea to solve this problem ?

PS: I already have the ID's for Add-on Management.
Anonymous
Not applicable
I have downloaded the API Dev Kit 19 and VS Studio 2015. I can now open the project but when I'm trying to build it, I get several sythax errors like these :

c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(70): error C3646: '_THROW1': unknown override specifier
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(70): warning C4595: 'operator new': non-member operator new or delete functions may not be declared inline
1> c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(70): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(70): error C2059: syntax error: '('
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(71): error C2143: syntax error: missing ';' before '{'
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(71): error C2447: '{': missing function header (old-style formal list?)
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(79): error C2601: 'operator delete': local function definitions are illegal
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(89): error C3646: '_THROW1': unknown override specifier
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(89): error C2059: syntax error: '('
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(89): error C2059: syntax error: ')'
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(90): error C2143: syntax error: missing ';' before '{'
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(90): error C2447: '{': missing function header (old-style formal list?)
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(98): error C2601: 'operator delete[]': local function definitions are illegal
1>c:\users\jean-charles\desktop\api development kit 19.3003\support\modules\gsroot\GSNew.hpp(109): error C2601: 'operator new': local function definitions are illegal

I don't understand why I get those errors. Is it possible that the code contains errors ?
Karl Ottenstein
Moderator
Cedric wrote:
I have downloaded the API Dev Kit 19 and VS Studio 2015. I can now open the project but when I'm trying to build it, I get several sythax errors like these :
Your first question was about API kit 18. Now, you're using 19. Still, Akos' response was that VS 2015 was for AC 21 and above. Presumably, you should be using VS 2010 for the 19 kit...(?)

Edit/PS: The first error concerning _THROW1 on line 70 suggests that the compiler options are not set to properly handle preprocessor statements, since line 35 defines it:
#define _THROW1 throw
simply as a macro alias...
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Karl wrote:
Cedric wrote:
I have downloaded the API Dev Kit 19 and VS Studio 2015. I can now open the project but when I'm trying to build it, I get several sythax errors like these :
Your first question was about API kit 18. Now, you're using 19. Still, Akos' response was that VS 2015 was for AC 21 and above. Presumably, you should be using VS 2010 for the 19 kit...(?)

Edit/PS: The first error concerning _THROW1 on line 70 suggests that the compiler options are not set to properly handle preprocessor statements, since line 35 defines it:
#define _THROW1 throw
simply as a macro alias...
Hello,
Thank you for your answer.
I know what the first answer was about I'm sorry. I'm lost and I try to build something and my first add-on with any version of Archicad from AC15 in order to begin some development. I know I will be able to develop something with the documentation as soon as I configure the IDE properly. I'm going to try your advice for this error.
Thank you

PS : Sorry for my poor English.
Akos Somorjai
Graphisoft
Graphisoft
Cedric wrote:
Thank you for your answer.

I downloaded Visual C++ 2010 Express. When I double click on the project, Nothing happens. I tried to open it directly in VS but i got this error message :

"Platform 'x64' referenced in the project file 'Panel_Test' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'"

They tell me to use the x64 configuration in the Configuration Manager but there is only the x32. I can't find it.

Do you have an idea to solve this problem ?

PS: I already have the ID's for Add-on Management.
Yes. The 64-bit compilers are not part of the Express edition; you'll need a commercial Visual Studio license. You have to have the 64-bit compilers, because ARCHICAD itself is 64-bit.

Best, Akos
Akos Somorjai
Graphisoft
Graphisoft
Cedric wrote:
Karl wrote:
Cedric wrote:
I have downloaded the API Dev Kit 19 and VS Studio 2015. I can now open the project but when I'm trying to build it, I get several sythax errors like these :
Your first question was about API kit 18. Now, you're using 19. Still, Akos' response was that VS 2015 was for AC 21 and above. Presumably, you should be using VS 2010 for the 19 kit...(?)

Edit/PS: The first error concerning _THROW1 on line 70 suggests that the compiler options are not set to properly handle preprocessor statements, since line 35 defines it:
#define _THROW1 throw
simply as a macro alias...
Hello,
Thank you for your answer.
I know what the first answer was about I'm sorry. I'm lost and I try to build something and my first add-on with any version of Archicad from AC15 in order to begin some development. I know I will be able to develop something with the documentation as soon as I configure the IDE properly. I'm going to try your advice for this error.
Thank you

PS : Sorry for my poor English.
I would recommend downloading the ARCHICAD 21 devkit, because that works with the VS2015 compiler. You can also get a trial / educational license for ARCHICAD 21, so if you just want to start with API programming, that should be sufficient.

And don't worry about your English, at least half of the folks here are non-native speakers

Best, Akos
Anonymous
Not applicable
Akos wrote:

I would recommend downloading the ARCHICAD 21 devkit, because that works with the VS2015 compiler. You can also get a trial / educational license for ARCHICAD 21, so if you just want to start with API programming, that should be sufficient.

And don't worry about your English, at least half of the folks here are non-native speakers

Best, Akos
Hello,
I tried with the API21 and it works fine. However, I don't have this version of Archicad and I would like to work with a version I own. The message I get when I'm trying to open an example with VS10 is the following :
"Platform 'x64' referenced in the project file 'Panel_Test' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'". I did it on a x64 and a x86 Windows. I've read I have to change the Platform in the Configuration Manager but I don't have the x64 Platform...
Do you have a solution ?
Regards.
Akos Somorjai
Graphisoft
Graphisoft
Cedric wrote:
Akos wrote:

I would recommend downloading the ARCHICAD 21 devkit, because that works with the VS2015 compiler. You can also get a trial / educational license for ARCHICAD 21, so if you just want to start with API programming, that should be sufficient.

And don't worry about your English, at least half of the folks here are non-native speakers

Best, Akos
Hello,
I tried with the API21 and it works fine. However, I don't have this version of Archicad and I would like to work with a version I own. The message I get when I'm trying to open an example with VS10 is the following :
"Platform 'x64' referenced in the project file 'Panel_Test' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'". I did it on a x64 and a x86 Windows. I've read I have to change the Platform in the Configuration Manager but I don't have the x64 Platform...
Do you have a solution ?
Regards.
Yes, that is because you use the Express Edition of the VS2010 compiler; that does not include the x64 compilers — those are only available in the commercial version of VS2010. So either you would have to switch to ARCHICAD 21, or purchase the Visual Studio 2010 commercial version.

Sorry, Akos