You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thanks for this template. It's been very useful to get started on a plugin.
I started with this template, then have copied in most of the BrowserControl example. I noticed when doing this that the builds started failing for Archicad 25 and 26. This appears to be for a few reasons, but all of them seem to be namespace or function name changes.
For example, ACAPI_Register_Menu in AC26 vs. ACAPI_MenuItem_RegisterMenu in AC27.
Similarly, the JS object classes were formerly DG::JSValue and are now JS::Value.
I am relatively new to C++. Is there a technique for using different names based on AC version? It would be convenient to be able to target multiple out of one project.
Edit: Looking at this again it seems like quite a bit of work to manage multiple versions as the API seems to have changed a reasonable amount (at least by naming convention) between AC26 and AC27
The text was updated successfully, but these errors were encountered:
I've worked around this by adding the following to CMakeLists.txt
if (DEFINED ADDITIONAL_COMPILE_DEFINITIONS)
add_compile_definitions(${ADDITIONAL_COMPILE_DEFINITIONS})
endif()
Subsequently if using the python build tools, it can be used in the following way: python Tools/BuildAddOn.py --configFile config.json --acVersion 27 --additionalCMakeParams ADDITIONAL_COMPILE_DEFINITIONS='PLUGIN_VERSION="1.2.3.4";ARCHICAD_27'
Hello! Thanks for this template. It's been very useful to get started on a plugin.
I started with this template, then have copied in most of the BrowserControl example. I noticed when doing this that the builds started failing for Archicad 25 and 26. This appears to be for a few reasons, but all of them seem to be namespace or function name changes.
For example,
ACAPI_Register_Menu
in AC26 vs.ACAPI_MenuItem_RegisterMenu
in AC27.Similarly, the JS object classes were formerly
DG::JSValue
and are nowJS::Value
.I am relatively new to C++. Is there a technique for using different names based on AC version? It would be convenient to be able to target multiple out of one project.
Coming from C# the equivalent would be:
Edit: Looking at this again it seems like quite a bit of work to manage multiple versions as the API seems to have changed a reasonable amount (at least by naming convention) between AC26 and AC27
The text was updated successfully, but these errors were encountered: