SOLVED!
Write Report

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-02-22
08:56 PM
- last edited on
2022-10-04
04:36 PM
by
Daniel Kassai
2019-02-22
08:56 PM
This question has been asked before but I don't think there has been a satisfactory answer.
The WriteReport function in the examples is not writing to the Session Report.
Is there another location other than the Session Report?
I have checked the Write report check box and set the slider to full. under model Rebuild Options.
Using ver 22 on PC.
The WriteReport function in the examples is not writing to the Session Report.
Is there another location other than the Session Report?
I have checked the Write report check box and set the slider to full. under model Rebuild Options.
Using ver 22 on PC.
Gerry
Windows 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27
Solved! Go to Solution.
Labels:
- Labels:
-
Add-On (C++)
1 ACCEPTED SOLUTION
Accepted Solutions
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-02-25 10:53 AM
2019-02-25
10:53 AM
Hi,
The WriteReport function is defined in the APICommon.c file, which contains several helper functions, which are not part of the API itself, but utilize it. It sinply acts as a wrapper over the ACAPI_WriteReport and DBPrintf functions.
The ACAPI_WriteReport function itself has two modes. It either prints its output to the Session Report, or in an alert box.
The DBPrintf function can print output to a Debugger (if one is present and attached), as such, it should only be used for debugging.
The lines starting with # are processed by the C/C++ preprocessor. The most frequent directives are #include, #define, and #if. The latter two are mostly used for conditional compilation.
You can find more information about these directives here.
If you want to be certain, that you write to the Session Report, you should use ACAPI_WriteReport directly.
Best regards,
Dénes
The WriteReport function is defined in the APICommon.c file, which contains several helper functions, which are not part of the API itself, but utilize it. It sinply acts as a wrapper over the ACAPI_WriteReport and DBPrintf functions.
The ACAPI_WriteReport function itself has two modes. It either prints its output to the Session Report, or in an alert box.
The DBPrintf function can print output to a Debugger (if one is present and attached), as such, it should only be used for debugging.
The lines starting with # are processed by the C/C++ preprocessor. The most frequent directives are #include, #define, and #if. The latter two are mostly used for conditional compilation.
You can find more information about these directives here.
If you want to be certain, that you write to the Session Report, you should use ACAPI_WriteReport directly.
Best regards,
Dénes
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-02-22 11:47 PM
2019-02-22
11:47 PM
UPDATE:
I looked at this again and found that the function WriteReport() is being defined in the APICommon.c file.
However the redefinition to ACAPI_Writereport is either being redefined or skipped by using a # directive at the start of the line.
Does anyone know what the # sign is suppose to do in VS and how to utilize it?
EDIT:
OK - figured it out but don't know why Archicad would omit the writereport function by default? Don't know what the DBprint does instead?
I looked at this again and found that the function WriteReport() is being defined in the APICommon.c file.
However the redefinition to ACAPI_Writereport is either being redefined or skipped by using a # directive at the start of the line.
Does anyone know what the # sign is suppose to do in VS and how to utilize it?
EDIT:
OK - figured it out but don't know why Archicad would omit the writereport function by default? Don't know what the DBprint does instead?
Gerry
Windows 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-02-25 10:53 AM
2019-02-25
10:53 AM
Hi,
The WriteReport function is defined in the APICommon.c file, which contains several helper functions, which are not part of the API itself, but utilize it. It sinply acts as a wrapper over the ACAPI_WriteReport and DBPrintf functions.
The ACAPI_WriteReport function itself has two modes. It either prints its output to the Session Report, or in an alert box.
The DBPrintf function can print output to a Debugger (if one is present and attached), as such, it should only be used for debugging.
The lines starting with # are processed by the C/C++ preprocessor. The most frequent directives are #include, #define, and #if. The latter two are mostly used for conditional compilation.
You can find more information about these directives here.
If you want to be certain, that you write to the Session Report, you should use ACAPI_WriteReport directly.
Best regards,
Dénes
The WriteReport function is defined in the APICommon.c file, which contains several helper functions, which are not part of the API itself, but utilize it. It sinply acts as a wrapper over the ACAPI_WriteReport and DBPrintf functions.
The ACAPI_WriteReport function itself has two modes. It either prints its output to the Session Report, or in an alert box.
The DBPrintf function can print output to a Debugger (if one is present and attached), as such, it should only be used for debugging.
The lines starting with # are processed by the C/C++ preprocessor. The most frequent directives are #include, #define, and #if. The latter two are mostly used for conditional compilation.
You can find more information about these directives here.
If you want to be certain, that you write to the Session Report, you should use ACAPI_WriteReport directly.
Best regards,
Dénes

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-02-25 10:29 PM
2019-02-25
10:29 PM
Hi
Thanks for the update.
Very Helpful.
Thanks for the update.
Very Helpful.
Gerry
Windows 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27