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

Create basic AddOn for Archicad 22 in Visual Studio

Anonymous
Not applicable
Hello. Please very good if you can help me. I want to create an AddOn for Archicad 22 that is similar to Eptar Reinforcement as design.

I installed Visual Studio 2017, Archicad 22, I have the Archicad developer key, but I can not compile a code and install it as an addon in Archicad.

I want to learn how to make a very simplified addon, to see in Archicad that a window with a function opens and to go.

I looked at c ++ tutorials, c # .. but in vain.

I saw the extension of an addon is *. APX. do I have to do a Setup.exe for addon or how to do it? Interface in Archicad I create in C #?

I've been trying to see the examples from Archicad, but I get errors.

Some print screens would be very useful if you can not do a basic tutorial.

Please be very nice if you can help me. Bogdan

Sorry for my bad enlish i hope you understand
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
silazion wrote:
I'm getting 647 errors for DG_Test.cpp. "Can not open source file ... and more"
Do I have to change something at Include Directory to work?
The project seems to be damaged. There should be paths to the required API directories listed there. Try downloading the API dev-kit again.
silazion wrote:
After I can solve this problem, can I see the examples in archicad? Or, in the examples, only the code is written. I do not understand how I can modify the user interface, should I use C # for this or directly in Archicad?
http://archicadapi.graphisoft.com/hello-world-part-2-dialog-with-text-svg-icon-and-button
Yes, when it builds you can see the examples in ARCHICAD.

I wouldn't recommend trying to use C# in this context. It's unlikely to work.
Ralph Wessel BArch

View solution in original post

13 REPLIES 13
Anonymous
Not applicable
I think i must uninstall VS 2017 and install VS 2015 update 3.
I succeeded to create data base with my ID, i save data base *.h file.


I found an example with hello world but did not load the * .grc source code.

do I need to install Windows SDK?

I would like to see an example that works. I will install VS 2015 and try again.

it was a good video or a few print screens
Ralph Wessel
Mentor
silazion wrote:
I think i must uninstall VS 2017 and install VS 2015 update 3.
I succeeded to create data base with my ID, i save data base *.h file.
You can use VS2017 provided you select the VS2015 toolset for building the add-on. There is a blog article on the API Developer website here.

Try building one of the example add-ons using the VS2015 toolset first. If you can get that working, you have taken a big step forward.
Ralph Wessel BArch
Anonymous
Not applicable
Windows SDK Version: 10.0.17134.0
Platform toolset: No Upgrade
Archicad: 22
Visual Studio: 2015



I'm getting 647 errors for DG_Test.cpp. "Can not open source file ... and more"
Do I have to change something at Include Directory to work?
After I can solve this problem, can I see the examples in archicad? Or, in the examples, only the code is written. I do not understand how I can modify the user interface, should I use C # for this or directly in Archicad?
http://archicadapi.graphisoft.com/hello-world-part-2-dialog-with-text-svg-icon-and-button

Thank you!
Solution
Ralph Wessel
Mentor
silazion wrote:
I'm getting 647 errors for DG_Test.cpp. "Can not open source file ... and more"
Do I have to change something at Include Directory to work?
The project seems to be damaged. There should be paths to the required API directories listed there. Try downloading the API dev-kit again.
silazion wrote:
After I can solve this problem, can I see the examples in archicad? Or, in the examples, only the code is written. I do not understand how I can modify the user interface, should I use C # for this or directly in Archicad?
http://archicadapi.graphisoft.com/hello-world-part-2-dialog-with-text-svg-icon-and-button
Yes, when it builds you can see the examples in ARCHICAD.

I wouldn't recommend trying to use C# in this context. It's unlikely to work.
Ralph Wessel BArch
Anonymous
Not applicable
Thank you very much! I succeeded !
Anonymous
Not applicable
Hi,

I try to implement HelloWorld(simplest one) example. I got 2 errors. How can I find out?
(I have VS 2017 and api dev 23)

Ralph Wessel
Mentor
For the error shown in the first image, can you scroll down a bit further to reveal the explanation for the warning?

For the other errors in the second image, can you tell me which platform toolset you are using for the project? You can find this in the project properties under General > Platform Toolset. Also, which version of ARCHICAD are you targeting?
Ralph Wessel BArch
Anonymous
Not applicable
Hi Ralph,

Ralph Wessel
Mentor
Try changing this line:
const size_t    hwLen  = strlen (hwText) + 1;
…to this:
const GSSize    hwLen  = strlen (hwText) + 1;
Ralph Wessel BArch