<?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 class &amp;quot;API_Elem_Head&amp;quot; has no member &amp;quot;typeID&amp;quot; in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/582984#M9052</link>
    <description>&lt;P&gt;AC27 - - WIN10 - - VS2019&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;New Year greetings to all.&amp;nbsp; I am migrating code from AC25 to AC27, and Visual Studio is giving me some pushback that I don't really understand.&amp;nbsp; I might add that I am not the original author of this code.&amp;nbsp; The working AC25 code is this:&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 &amp;lt;APIdefs_Elements.h&amp;gt;
//------------------------------------------------------
// Element driven events
//------------------------------------------------------

GSErrCode __ACENV_CALL NewElementEventHandler(const API_NotifyElementType *notifyElemType) // new element
{
	GSErrCode err = NoError;

	// Do nothing if the live audit is not enabled
	if (!JHP::LiveAudit::GetInstance().Enabled())
		return err;

	if (notifyElemType-&amp;gt;elemHead.typeID == API_DimensionID)
	{

		if (notifyElemType-&amp;gt;notifID == -1)
			JHP::LiveAudit::GetInstance().Observe(notifyElemType-&amp;gt;elemHead.typeID, notifyElemType-&amp;gt;elemHead.guid);
	}
	else
		JHP::LiveAudit::GetInstance().Observe(notifyElemType-&amp;gt;elemHead.typeID, notifyElemType-&amp;gt;elemHead.guid);
...&lt;/LI-CODE&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;P&gt;Visual Studio is telling me:&amp;nbsp;&amp;nbsp;class "API_Elem_Head" has no member "typeID"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My research into this is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_0-1704386085636.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51349i351B74D7414423EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_0-1704386085636.png" alt="MudratDetector_0-1704386085636.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_1-1704478668222.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51625iFA50BDDAC9A4285A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_1-1704478668222.png" alt="MudratDetector_1-1704478668222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Making the edit from .typeID to .type seems to work for the if condition [0], but is not happy when used in the .Observe arguments [1, 2].&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_2-1704479082533.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51627i0A9C74ECE1B62BE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_2-1704479082533.png" alt="MudratDetector_2-1704479082533.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the user defined LiveAudit class methods, I find&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; void        Observe (API_ElemTypeID, API_Guid);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;which surprises me, since this code is working in AC25 and GS documentation states that API_ElemTypeID has only been available since AC26.&lt;BR /&gt;&lt;BR /&gt;Have I told enough of the story for someone to point me in the right direction so that I may solve this migration?&lt;BR /&gt;If not, let me know.&lt;BR /&gt;&lt;BR /&gt;All the best,&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2024 09:29:43 GMT</pubDate>
    <dc:creator>MudratDetector</dc:creator>
    <dc:date>2024-09-17T09:29:43Z</dc:date>
    <item>
      <title>class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/582984#M9052</link>
      <description>&lt;P&gt;AC27 - - WIN10 - - VS2019&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;New Year greetings to all.&amp;nbsp; I am migrating code from AC25 to AC27, and Visual Studio is giving me some pushback that I don't really understand.&amp;nbsp; I might add that I am not the original author of this code.&amp;nbsp; The working AC25 code is this:&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 &amp;lt;APIdefs_Elements.h&amp;gt;
//------------------------------------------------------
// Element driven events
//------------------------------------------------------

GSErrCode __ACENV_CALL NewElementEventHandler(const API_NotifyElementType *notifyElemType) // new element
{
	GSErrCode err = NoError;

	// Do nothing if the live audit is not enabled
	if (!JHP::LiveAudit::GetInstance().Enabled())
		return err;

	if (notifyElemType-&amp;gt;elemHead.typeID == API_DimensionID)
	{

		if (notifyElemType-&amp;gt;notifID == -1)
			JHP::LiveAudit::GetInstance().Observe(notifyElemType-&amp;gt;elemHead.typeID, notifyElemType-&amp;gt;elemHead.guid);
	}
	else
		JHP::LiveAudit::GetInstance().Observe(notifyElemType-&amp;gt;elemHead.typeID, notifyElemType-&amp;gt;elemHead.guid);
...&lt;/LI-CODE&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;P&gt;Visual Studio is telling me:&amp;nbsp;&amp;nbsp;class "API_Elem_Head" has no member "typeID"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My research into this is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_0-1704386085636.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51349i351B74D7414423EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_0-1704386085636.png" alt="MudratDetector_0-1704386085636.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_1-1704478668222.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51625iFA50BDDAC9A4285A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_1-1704478668222.png" alt="MudratDetector_1-1704478668222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Making the edit from .typeID to .type seems to work for the if condition [0], but is not happy when used in the .Observe arguments [1, 2].&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_2-1704479082533.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51627i0A9C74ECE1B62BE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_2-1704479082533.png" alt="MudratDetector_2-1704479082533.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the user defined LiveAudit class methods, I find&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; void        Observe (API_ElemTypeID, API_Guid);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;which surprises me, since this code is working in AC25 and GS documentation states that API_ElemTypeID has only been available since AC26.&lt;BR /&gt;&lt;BR /&gt;Have I told enough of the story for someone to point me in the right direction so that I may solve this migration?&lt;BR /&gt;If not, let me know.&lt;BR /&gt;&lt;BR /&gt;All the best,&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 09:29:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/582984#M9052</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-09-17T09:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583009#M9053</link>
      <description>&lt;P&gt;Prior to Archicad 26 the element type was represented by a single enum of type &lt;FONT face="courier new,courier"&gt;API_ElemTypeID&lt;/FONT&gt;. Starting from Archicad 26 the element type is represented as a struct named&amp;nbsp;&lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt;. It contains the same enum as before, but also contains other identification data (like &lt;FONT face="courier new,courier"&gt;API_Guid&lt;/FONT&gt; for identifying external elements, like the new MEP elements).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can you do?&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You can continue using the &lt;FONT face="courier new,courier"&gt;API_ElemTypeID &lt;/FONT&gt;enum from the &lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt; struct. It will work as long as you don't want to use new elements appearing in Archicad in the future.&lt;/LI&gt;
&lt;LI&gt;Rewrite your code to use &lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt; everywhere so you will have a more future-proof implementation.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sat, 06 Jan 2024 12:28:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583009#M9053</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2024-01-06T12:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583321#M9065</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/12765"&gt;@Viktor Kovacs&lt;/a&gt;&amp;nbsp; - thanks for the info.&amp;nbsp; I will rewrite&amp;nbsp;&lt;SPAN&gt;code to use&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;everywhere so we have a more future-proof implementation.&amp;nbsp; That just makes sense.&lt;BR /&gt;&lt;BR /&gt;But...&amp;nbsp; if I am allowed to continue using the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;API_ElemTypeID&amp;nbsp;&lt;/FONT&gt;enum from the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt;&amp;nbsp;struct, why would this be reading as an error now, without making any edits?&amp;nbsp; Just curious...&lt;BR /&gt;&lt;BR /&gt;Thanks for your continued support and insight,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 16:52:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583321#M9065</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-09T16:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583393#M9066</link>
      <description>&lt;P&gt;The type field was earlier an enum, and is now a struct. If a function expects an enum than it won't compile. The other way will silently work because&amp;nbsp;&lt;FONT face="courier new,courier"&gt;API_ElemType&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;has a non-explicit one-parameter constructor with an enum value, so the compiler will construct the object automatically.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 07:15:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583393#M9066</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2024-01-10T07:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583488#M9067</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/12765"&gt;@Viktor Kovacs&lt;/a&gt;&amp;nbsp;- - thanks agian for the detailed explanation.&amp;nbsp; I feel like this is basic stuff, but I don't know what I don't know.&amp;nbsp; After your comments, I was able to correct all of these &lt;FONT face="courier new,courier"&gt;API_ElemTypeID&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;vs.&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;API_ElemType&amp;nbsp;&lt;/FONT&gt;instances in my project in a matter of a few minutes.&amp;nbsp; Also - a few other edits to respond to changes in the API since AC25.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another struggle in the same project migration with something I wonder might be related.&amp;nbsp; All of the coding seems to be agreeable, but I am receiving LNK2019 errors [&lt;SPAN&gt;unresolved external symbol '&lt;/SPAN&gt;&lt;EM&gt;symbol&lt;/EM&gt;&lt;SPAN&gt;' referenced in function '&lt;/SPAN&gt;&lt;EM&gt;function&lt;/EM&gt;&lt;SPAN&gt;']&lt;/SPAN&gt;.&amp;nbsp; 29 of them to be exact and all related to methods in a couple of different classes.&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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;    Building Custom Rule G:/dev/v27/JHP_Audit/CMakeLists.txt
    APICommon.c
    JHP_Audit.cpp
    Generating Code...

G:\dev\v27\JHP_Audit\out\build\x64-Release\JHP_Audit.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl JHP::LiveAudit::HasInstance(void)" (?HasInstance@LiveAudit@JHP@@SA_NXZ) referenced in function "int __cdecl ProjectEventHandler(enum API_NotifyEventID,int)" (?ProjectEventHandler@@YAHW4API_NotifyEventID@@H@Z) 

G:\dev\v27\JHP_Audit\out\build\x64-Release\JHP_Audit.obj : error LNK2019: unresolved external symbol "public: static class JHP::LiveAudit &amp;amp; __cdecl JHP::LiveAudit::GetInstance(void)" (?GetInstance@LiveAudit@JHP@@SAAEAV12@XZ) referenced in function "int __cdecl MenuCommandHandler(struct API_MenuParams const *)" (?MenuCommandHandler@@YAHPEBUAPI_MenuParams@@@Z) 

G:\dev\v27\JHP_Audit\out\build\x64-Release\JHP_Audit.obj : error LNK2019: unresolved external symbol "public: static void __cdecl JHP::LiveAudit::CreateInstance(void)" (?CreateInstance@LiveAudit@JHP@@SAXXZ) referenced in function "int __cdecl ProjectEventHandler(enum API_NotifyEventID,int)" (?ProjectEventHandler@@YAHW4API_NotifyEventID@@H@Z) 
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am really out of my element here and have no idea where to even begin to look.&lt;BR /&gt;Thanks [once again] for pointing me in a right direction.&lt;BR /&gt;&lt;BR /&gt;All the best - Chris&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 19:19:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583488#M9067</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-11T19:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583571#M9069</link>
      <description>&lt;P&gt;I woke up at 2am last night in Texas thinking about this.&amp;nbsp; I had to revise my CMakeList.txt file a bit to get it to work with a Linker issue on the first migrations from AC25 to AC27 and using CMake.&amp;nbsp; The forum discussion about these these revisions can be seen&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://community.graphisoft.com/t5/Archicad-C-API/Migration-from-API-25-to-API-26-And-CMake/td-p/401288" target="_blank" rel="noopener"&gt;HERE&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My CMakeList.txt file is here and the revision I am talking about involved adding the last line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;cmake_minimum_required (VERSION 3.16)

include (Tools/CMakeCommon.cmake)

set (API_DEVKIT_DIR $ENV{AC_API_DEVKIT_DIR} CACHE PATH "API DevKit directory.")

if (GITHUB_BUILD)
    include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
    set (API_DEVKIT_DIR ${CONAN_ARCHICAD-APIDEVKIT_ROOT}/bin)
endif ()

set_property (GLOBAL PROPERTY USE_FOLDERS ON)

# set (CMAKE_CONFIGURATION_TYPES Debug;Release;RelWithDebInfo)
set (CMAKE_CONFIGURATION_TYPES Release)
set (AC_API_DEVKIT_DIR ${API_DEVKIT_DIR} CACHE PATH "API DevKit directory.")
set (AC_ADDON_NAME "JHP_Audit" CACHE STRING "AddOn Name")
set (AC_ADDON_LANGUAGE "INT" CACHE STRING "Add-On language code.")

project (${AC_ADDON_NAME} CXX)

message( STATUS "&amp;gt;&amp;gt;&amp;gt; AC_API_DEVKIT_DIR: $ENV{AC_API_DEVKIT_DIR}")
DetectACVersion (${AC_API_DEVKIT_DIR} ACVersion)
message (STATUS "Archicad Version: ${ACVersion}")

set (AddOnFolder .)
SetGlobalCompilerDefinitions ()
GenerateAddOnProject (${ACVersion} ${AC_API_DEVKIT_DIR} ${AC_ADDON_NAME} ${AddOnFolder} ${AC_ADDON_LANGUAGE})
set_target_properties(${AC_ADDON_NAME} PROPERTIES LINKER_LANGUAGE CXX)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe that helps???&lt;/P&gt;&lt;P&gt;Have a great day - Chris&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 18:32:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583571#M9069</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-11T18:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583612#M9070</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;&amp;nbsp;Next day:&lt;/U&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I moved on to the last custom add-on I want to migrate from 25 to 27.&amp;nbsp; I receive the same message [error LNK2019: unresolved external symbol] when I build.&amp;nbsp; This time, it is related to a dialog callback function.&amp;nbsp; Output from Build is:&lt;BR /&gt;&lt;/SPAN&gt;&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;    Building Custom Rule G:/dev/v27/JHP_Layouts/CMakeLists.txt
    APICommon.c
    JHP_Layouts.cpp
    Generating Code...
G:\dev\v27\JHP_Layouts\out\build\x64-Release\JHP_Layouts.obj : error LNK2019: unresolved external symbol "short __cdecl JHP::Dialogs::ConsultantSheetsDialogCallback(short,short,short,__int64,__int64)" (?ConsultantSheetsDialogCallback@Dialogs@JHP@@YAFFFF_J0@Z) referenced in function "private: virtual int __cdecl std::_Func_impl_no_alloc&amp;lt;class &amp;lt;lambda_698cf9db7fb234a3b63567341aabf019&amp;gt;,int&amp;gt;::_Do_call(void)" (?_Do_call@?$_Func_impl_no_alloc@V&amp;lt;lambda_698cf9db7fb234a3b63567341aabf019&amp;gt;@@H$$V@std@@EEAAHXZ) 
G:\dev\v27\JHP_Layouts\out\build\x64-Release\Release\JHP_Layouts.apx : fatal error LNK1120: 1 unresolved externals 

Build All failed.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;The code that this message is referencing is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#pragma once

#include    "DG.h"
#include    "DGDialog.hpp"

namespace JHP
{
    namespace Dialogs
    {
        short DGCALLBACK ConsultantSheetsDialogCallback(short message, short dialId, short item, DGUserData, DGMessageData);
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I notice is that these are the only projects with .cpp and .h files in subfolders below .\Src folder.&amp;nbsp; Would a CMakeList.txt file be required in the subfolders as well?&amp;nbsp; These subfolder files contain the functions in the Build error messages.&amp;nbsp; Coincidence?&amp;nbsp; Or maybe the reference to find the CMakeList.txt file is "..\CMakeList.txt" and needs to be modified to&amp;nbsp;"..\CMakeList.txt; ..\..\CMakeList.txt".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to any insight that comes my way...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 19:43:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583612#M9070</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-11T19:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583614#M9071</link>
      <description>&lt;P&gt;Check these two things that changed between AC25 and AC27:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Visual Studio platform toolset has changed:&amp;nbsp;&lt;A href="https://community.graphisoft.com/t5/Archicad-C-API/Using-the-Development-Kit-with-Visual-Studio-2022/m-p/344684#M1543" target="_blank"&gt;https://community.graphisoft.com/t5/Archicad-C-API/Using-the-Development-Kit-with-Visual-Studio-2022/m-p/344684#M1543&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;The code must be compiled with C++17:&amp;nbsp;&lt;A href="https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/blob/2ccf64d7fe926f9c13a4d033f0e781a68a9764bf/CMakeCommon.cmake#L17" target="_blank"&gt;https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/blob/2ccf64d7fe926f9c13a4d033f0e781a68a9764bf/CMakeCommon.cmake#L17&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 19:56:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583614#M9071</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2024-01-11T19:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583617#M9072</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/12765"&gt;@Viktor Kovacs&lt;/a&gt;&amp;nbsp;- thanks for the reply.&amp;nbsp; I have previously read the first link you provide regarding the toolset change.&lt;/P&gt;&lt;P&gt;I understood this&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;"If you try to use VS 2022 to build your AddOns, you have to keep in mind a few things."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;with an emphasis on "try", as - - if I was using VS2022 with toolset 143, I need to back off to toolset 142, but since I was using VS2019 with toolset 142 [and not trying to use 2022], I was OK.&lt;BR /&gt;&lt;BR /&gt;However, your second link really makes clear the need for C++17, which I had not picked up on until now.&amp;nbsp; And I have not had any issues with prior migrations of four add-ons from 25 to 27.&amp;nbsp; They are loading and working without issue in AC27.&lt;BR /&gt;&lt;BR /&gt;I now understand my path is to change my current configuration [in red] to the necessary configuration [in green].&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MudratDetector_0-1705006174578.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51819i8F7F5D72A867140C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MudratDetector_0-1705006174578.png" alt="MudratDetector_0-1705006174578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea why the previous four add-ons are in working order for 27?&lt;/P&gt;&lt;P&gt;Or what about these last two are finally making me take notice?&lt;/P&gt;&lt;P&gt;Just curious...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have been loads of help on this particular learning exercise.&lt;/P&gt;&lt;P&gt;It is greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 20:53:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/583617#M9072</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-11T20:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584246#M9091</link>
      <description>&lt;P&gt;Your second link references code in the CMakeCommon.cmake file:&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;target_compile_features (${target} PUBLIC cxx_std_17)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which seems like the CMake version of the /std:c++17 switch that will "&lt;EM&gt;Enable supported C and C++ language features from the specified version of the C or C++ language standard."&amp;nbsp;&amp;nbsp;&lt;/EM&gt;and has been &lt;EM&gt;"&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;available in Visual Studio 2017 and later. They're used to control the version-specific ISO C or C++ programming language standard features enabled during compilation of your code."&lt;/EM&gt;&amp;nbsp; This sounds like direction for the compiler which makes me think that the features of C++17 requiring this direction might be available to my VS2019 install [Version 16.11.30].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am I thinking about this correctly?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this already part of my VS2019 install?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it something I need to [or even can] install to VS2019?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Just curious to understand this part of the puzzle before I rush right out and purchase an upgrade to VS2022.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info - chris&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;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 22:02:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584246#M9091</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-16T22:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584277#M9093</link>
      <description>&lt;P&gt;The version is Visual Studio is actually not important. What matters is the platform toolset (141, 142, etc.). You can install earlier platform toolsets to any Visual Studio, so you can safely upgrade to Visual Studio 2022, but make sure that you have the earlier platform toolsets installed. If you are using the CMake template, it will make sure that everything is set up correctly independently from the Visual Studio version.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 06:38:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584277#M9093</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2024-01-17T06:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: class "API_Elem_Head" has no member "typeID"</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584363#M9096</link>
      <description>&lt;P&gt;Hi Viktor,&lt;/P&gt;&lt;P&gt;Thanks for the continued conversation on this topic.&amp;nbsp; We are architects here [and not developers] and your information has been very helpful.&lt;/P&gt;&lt;P&gt;I am interested in staying with VS2019 [toolset 142].&amp;nbsp; How do I get the features of the C++17 standard with toolset 142 operating in VS2019.&amp;nbsp; From what I have read, that seems possible with VS2019.&amp;nbsp; Otherwise you would not need to instruct the compiler to use the C++17 standard???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;What matters is the platform toolset (141, 142, etc.)."&lt;BR /&gt;&lt;/EM&gt;VS2019 with toolset 142 is what I have installed.&amp;nbsp; It is what I would like to keep.&amp;nbsp; If I can somehow turn on, activate, or install the C++17 standard in VS2019, I would be set to continue.&amp;nbsp; I imagine [key word here - imagine] that I can do that or I would not have the need nor would I be able to instruct the compiler to use the C++17 standard.&amp;nbsp; Are these even related?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Is this even possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day and thanks - chris&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 15:21:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/class-quot-API-Elem-Head-quot-has-no-member-quot-typeID-quot/m-p/584363#M9096</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2024-01-19T15:21:41Z</dc:date>
    </item>
  </channel>
</rss>

