The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, rmasaki, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

#301871
I installed the Archicad 23 API package and also checked the box for the installation of the Visual Studio template. But i can not find the template. It is not located under the Support folder. Any ideas on how to get it?

On windows 10 with Visual Studio Community 2017
#301915
Hi Gerry,

The template will be installed directly into the Visual Studio. So it will be placed into your VS templates folder, by default:
Code: Select all
<user documents>\Visual Studio 2017\Templates\ProjectTemplates\Visual C++ Project
You should find the ARCHICAD_Add-On_Template_For_VS.zip file here.

Yes, it's a zip and that's correct, Visual Studio will unpack it at runtime and it will be listed in the C++ project templates in the "New Project" dialog:
VS_AC_Template.png
#301919
Please note that you can install not only Template Project for Visual Studio, but there is an option to install Debugger Visualizers too.

Those Debugger Visualizers will be installed directly to your Visual Studio's Visualizers folder also:
Code: Select all
<user documents>\Visual Studio 2017\Visualizers

Thanks to those visualizers you will be able to debug the content of objects with type GS::UniString, IO::Location and many others.
GS_VS_Tools.png
GS_VS_Tools.png (22.38 KiB) Viewed 300 times
IOLocationNatVisExample.png
#305015
Thanks for showing where this template is. I had been looking for something like this.

Looking in the Src dir of the template project, why are the source files in C and not C++?

Thanks,
Dushyant
Tibor Lorántfy wrote:
Mon Sep 23, 2019 7:47 am
Hi Gerry,

The template will be installed directly into the Visual Studio. So it will be placed into your VS templates folder, by default:
Code: Select all
<user documents>\Visual Studio 2017\Templates\ProjectTemplates\Visual C++ Project
You should find the ARCHICAD_Add-On_Template_For_VS.zip file here.

Yes, it's a zip and that's correct, Visual Studio will unpack it at runtime and it will be listed in the C++ project templates in the "New Project" dialog:
VS_AC_Template.png
#305508
Thanks Gerry for the video.

Important points noted were:

The VC++ project must be saved in the API-Kit examples directory, and not in AchiCAD's Add-ons (or elsewhere), to compile successfully using the template.

In RegisterInterface function, MenuCode_Tools (default in template) places the menu under Options menu, and MenuCode_UserDef makes it as a new menu.

Dushyant