We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-08-29 05:14 AM
Hi guys,
I'm just a newbie in ArchiCAD API programming, I used the addon template and built the example code in API Development Kit. Now, I want to learn how to debug in Visual Studio 2022. Can you help me? If yes, can you show me step by step?
Thank you very much.
Solved! Go to Solution.
2023-08-29 11:35 AM
1. download and install the visualizer and put them in the folder where the steps tell you:
https://archicadapi.graphisoft.com/tools-for-debugging
2. go to the properties of your project (right click):
3. define where your archicad.exe sits under "debugging"
4. start archicad with "start new instance" (again right click on your project)
5. set your break points where you want and use VS like you waht with the step in etc commands.
good luck 😄
2023-08-29 11:35 AM
1. download and install the visualizer and put them in the folder where the steps tell you:
https://archicadapi.graphisoft.com/tools-for-debugging
2. go to the properties of your project (right click):
3. define where your archicad.exe sits under "debugging"
4. start archicad with "start new instance" (again right click on your project)
5. set your break points where you want and use VS like you waht with the step in etc commands.
good luck 😄
2023-08-29 12:07 PM
2023-08-29 03:35 PM - edited 2023-08-29 03:37 PM
im sorry, i never managed to get archicad 25 running in the debug mode, only 26. =( i never found out waht the problem was. do you have a ac26 at hand?
furthermore i dont see any debug information from your plugin in the output window, do they at least work? like ACAPI_WriteReport() or DBPrintf (); they should be shown in the debug window....
and last question, just to be sure: your function "GettAllMorph()" geht called, right? =D (Not a another one that just happens to also show OK11)
2023-08-30 09:17 AM
Thank you very much, Joel Buehler
I tried it on ArchiCAD 26 and it worked. Can I ask you one more question? Now I code and debug on ArchiCAD 26, so how can I run the addon on ArchiCAD 25 or another one?
Thank you very much.
2023-08-30 09:57 AM
im glad it works now 🙂
no, im afraid not: we only have forward compabillity and no backward. =(
this post explains a lot of the mindset behind graphisofts api compability:
https://archicadapi.graphisoft.com/documentation/compatibility
the post they link is also read worthy:
https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B
waht i would do if i have to etablish backward compability of my plugin:
1. finish the plugin in the version 26 since documentation and examples are in the best state in the newest version
2. when evrything runs fine i would create a new plugin from the template but as a 25 version
3. transfer all the working code to the 25 version.
4. hope i dont have to do to much maintance and new features on both codebases.
there are a few calls and structs that are different from 25 to 26 and are not directly portable. i encountered only a few and the ones that gave me trouble where in the element region.
but this is more a hack then anything elese... and only works fine if you develop the plugin alone.
the best solution would be to make a library with all the interchangable code. something like this:
but something like this could get very fast very unnecessary complex just for the sake of a "clean" solution.