<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Add-on not loading in ArchiCAD 27 in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/582926#M9050</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have been developing an Add-on using dev kit version 25 and Archicad 25. The same code was built successfully with ArchiCAD devkit 26 and we could load it successfully in ArchiCAD 26.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, for version 27, the build with devkit 27 was successful but the add-on is not being loaded.&amp;nbsp; Anything that we should be considering?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kency_0-1704452209500.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51602iA9E1821477977C4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kency_0-1704452209500.png" alt="kency_0-1704452209500.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 12:58:02 GMT</pubDate>
    <dc:creator>kency</dc:creator>
    <dc:date>2024-09-16T12:58:02Z</dc:date>
    <item>
      <title>Add-on not loading in ArchiCAD 27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/582926#M9050</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have been developing an Add-on using dev kit version 25 and Archicad 25. The same code was built successfully with ArchiCAD devkit 26 and we could load it successfully in ArchiCAD 26.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, for version 27, the build with devkit 27 was successful but the add-on is not being loaded.&amp;nbsp; Anything that we should be considering?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kency_0-1704452209500.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51602iA9E1821477977C4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kency_0-1704452209500.png" alt="kency_0-1704452209500.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:58:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/582926#M9050</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-09-16T12:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on not loading in ArchiCAD 27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/583122#M9056</link>
      <description>&lt;P&gt;Hi Kency,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here are a few things that changed that you might want to double check:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Since AC27 the Add-On needs to be compiled using C++17.&lt;BR /&gt;But I think your compilation would have already failed if you didn't have this setup correctly.&lt;/LI&gt;
&lt;LI&gt;There was a preview of the SDK for the technical preview and there was an update later. Make sure to use the latest 27.3001 SDK.&lt;/LI&gt;
&lt;LI&gt;Since you are on macOS, double check that your deployment version is at least 10.15 (check in CMake setup and used Info.plist). Although this might not be the issue, since AC26 has the same version here.&lt;/LI&gt;
&lt;LI&gt;Also the library path changed for AC27. On macOS it's now: &lt;STRONG&gt;&amp;lt;DEVKITDIR&amp;gt;/Support/Lib/libACAP_STAT.a&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;On macOS you have to make sure to use compatible binary versions. Id suggest making universal binaries so it works with both the Intel &amp;amp; Apple Silicon versions of Archicad.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This is all I can think of for now. If none of this works, maybe you can reduce your Add-On to a minimal example (remove all code with functionality, just leave in the barebones Add-On structure with your compilation setup) that you can share for us to debug.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:08:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/583122#M9056</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-01-08T10:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on not loading in ArchiCAD 27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/584194#M9089</link>
      <description>&lt;P&gt;I think I was doing it incorrectly earlier. When I tried now the compilation failed. Meanwhile, I was checking the CMake template project that ArchiCAD provides&amp;nbsp;&lt;A href="https://github.com/GRAPHISOFT/archicad-addon-cmake" target="_blank"&gt;https://github.com/GRAPHISOFT/archicad-addon-cmake&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What does the RFIX* and RINT folders mean?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 13:30:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/584194#M9089</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-01-16T13:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on not loading in ArchiCAD 27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/584204#M9090</link>
      <description>&lt;P&gt;To my knowledge the R stands for "Resources".&lt;BR /&gt;RFIX are fixed resources. In the sense that they are independent of the language.&lt;BR /&gt;So there are RFIX.win fixed resources for Windows and RFIX.mac fixed resources for macOS.&lt;/P&gt;
&lt;P&gt;RINT are resources localized to an international language version (analogous to Archicad INT version).&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 13:56:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/584204#M9090</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-01-16T13:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on not loading in ArchiCAD 27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/585273#M9114</link>
      <description>&lt;P&gt;Sharing the mistakes and changes that I did so that it helps someone else.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We were already developing in Archicad 26. So instead of clearing the Build folder(which already existed for 26) while the cmake command, only the xcode project name was changed.&amp;nbsp; Thereby the 27 xcode project was able to get the dev kit of 26. Clearing the Build folder and rebuilding failed the build for me. For which we had to make few changes as mentioned in below points. Takeaway: Keep separate Build folder for different versions&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cmake -B Build27 -G "Xcode" -DAC_API_DEVKIT_DIR=/Applications/Graphisoft\ Archicad\ API\ DevKit\ 27.3001/Support -DAC_ADDON_NAME=AddOn . &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;There were quite a few changes in the function names from Archicad27 for which there is a header file in DevKit ACAPI_Migration.hpp(including this conditionally with the pre processor directive gave errors.) See comments for&amp;nbsp;&lt;A href="https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-MigrationHeader-hpp/td-p/576765" target="_blank" rel="noopener"&gt;https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-MigrationHeader-hpp/td-p/576765&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;We have to write wrapper functions for handling API_OverriddenAttribute, API_AttributeIndex etc. Check below code snippet below for examples of such functions. We have included the following the MigrationUtils.hpp.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MigrationUtils.hpp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#ifndef MIGRATIONUTILS_HPP
#define MIGRATIONUTILS_HPP

#include "ACAPinc.h"
#if defined(ServerMainVers_2700)
#include "MigrationHeader27.hpp"
#endif

void SetAPIElementType (API_Element&amp;amp; element, API_ElemTypeID elemTypeId);
API_AttributeIndex GetAttributeIndex(Int32 index);
bool IsAttributeIndexPositive(API_AttributeIndex index);
API_OverriddenAttribute GetOverriddenAttribute(API_AttributeIndex attrIndex);
#endif&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MigrationUtils.cpp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include "MigrationUtils.hpp"

void SetAPIElementType (API_Element&amp;amp; element, API_ElemTypeID elemTypeId)
{
#ifdef ServerMainVers_2600
	element.header.type = API_ElemType (elemTypeId);
#else
	element.header.typeID = elemTypeId;
#endif
}

API_AttributeIndex GetAttributeIndex(Int32 index) {
#ifdef ServerMainVers_2700
    return ACAPI_CreateAttributeIndex(index);
#else
    return index;
#endif
}

bool IsAttributeIndexPositive(API_AttributeIndex index) {
#ifdef ServerMainVers_2700
    return index.IsPositive();
#else
    return index &amp;gt; 0;
#endif
}

API_OverriddenAttribute GetOverriddenAttribute(API_AttributeIndex attrIndex) {
#ifdef ServerMainVers_2700
    APIOptional&amp;lt;API_AttributeIndex&amp;gt; optional = {};
    optional.value = attrIndex;
    optional.hasValue = true;
    return optional;
#else
    API_OverriddenAttribute overriddenAttribute = {};
    overriddenAttribute.attributeIndex = attrIndex;
    overriddenAttribute.overridden = true;
    return overriddenAttribute;
#endif
}
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if there is any other better approach &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 11:26:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-on-not-loading-in-ArchiCAD-27/m-p/585273#M9114</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-01-24T11:26:43Z</dc:date>
    </item>
  </channel>
</rss>

