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.

creating custom add on challanges with VS 2017 and api dev kit 23

Anonymous
Not applicable
Hi guys,

I try to create custom add-ons using VS 2017, api dev kit 22. But I have 2 problems. I couldn't run the the sample project. The tool didn't recognize the libraries. I share the photo.
[/img][/img][/img][/img][/img]

I couldn't find AddOnAdmin tool. How can I reach it ? By the way, I have just free developer account. Should I pay something to have it ?

Thansk ...
10 REPLIES 10
Ralph Wessel
Mentor
It would be best to submit development questions in the Development section of the forum. Hopefully a forum admin can move the message there.

In order to 'run' an add-on, you need to launch the host version of ARCHICAD, in this case ARCHICAD 22. Set VS to launch ARCHICAD 22 for testing.
Ralph Wessel BArch
Anonymous
Not applicable
Thanks for your nice comment.
Laszlo Nagy
Community Admin
Community Admin
Topic moved to Developer Forum.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Anonymous
Not applicable
This tutorial shows how we can create our own custom add-ons easily.

https://www.youtube.com/channel/UCctZprzqwZYcymiog-gbzuw
Anonymous
Not applicable
Hi,

My VS 2017 tool doesn't recognize some C files. I redownload the API kit(23) again and again. What else should I do? For this reason, my code couldn't be built, run or debugged.

poco2013
Mentor
Looks like this is a problem that the Archicad programmers could help out on?

But in the meantime -- I had a similar problem and found that:

The development kit directory must be installed in the same directory under 'Program Files/Graphisoft' as the Archicad program is installed. This is because the example files have a security lock which restricts them to the application directory. I have not figured out how to remove that lock?

Second -- double check that the Support directory is in the same root directory as the examples directory. To find the support files, the compiler will go up one directory up and then into Support. You could change this in the compiler properties page.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Ralph Wessel
Mentor
mustafaakgure wrote:
My VS 2017 tool doesn't recognize some C files. I redownload the API kit(23) again and again. What else should I do?
The compiler doesn't know where to look for these files, so you need to provide it with a list of relevant directories in your project. You do this in the project properties (right-click the project and click Properties). Select the sectionC/C++ > General > Additional Include Directories (see attached image). Open any of the example projects with the dev-kit to see the kind of directories might be required for building an ARCHICAD API project.

You can put the dev-kit anywhere you like, but it's generally best to use relative paths from your project to the dev-kit directories for maximum portability - you only need to retain the same relationship rather than reconstructing all the paths if it's moved to another machine. I've attached another snapshot showing the paths for one of the API examples.
Ralph Wessel BArch
Anonymous
Not applicable
Thanks a lot, guys. I uninstall Archicad and API dev kit from Program Files. Because the operating system didn't allow me to create a new project under program files. I reinstall everything under document folder. Now, the build process is working fine but I have another issue to run the application. The issue is related with win32. But everything that I installed is win64. I think the apx extension file which is created by the tool is win32. How can I change it?

?
Ralph Wessel
Mentor
An add-on is dependent on ARCHICAD as a host and can't run as an independent application. Therefore, you need to run ARCHICAD to debug the add-on. Go back to the project properties, open the Debugging panel and enter the path to the relevant version of ARCHICAD (see attached image). There is an adjacent pulldown menu with a 'browse' option to select the target using a standard file navigator.
Ralph Wessel BArch
Learn and get certified!