<?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 Pointer Array Length in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262189#M2062</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;This is a novice question so maybe someone can help!!&lt;BR /&gt;&lt;BR /&gt;I am using Goodies(APIAny_ActParametersID, &amp;amp;getParams, Nullptr);&lt;BR /&gt;&lt;BR /&gt;getParams-&amp;gt;params (API_AddParType) returns a pointer to a list of the parameters in a Library Part&lt;BR /&gt;&lt;BR /&gt;How do I get the number parameters pointed to in order to iterate through the list and find the parameter I'm interested in?? I tried sizeof and just got garbage , so doing something wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:39:46 GMT</pubDate>
    <dc:creator>poco2013</dc:creator>
    <dc:date>2021-09-14T07:39:46Z</dc:date>
    <item>
      <title>Pointer Array Length</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262189#M2062</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;This is a novice question so maybe someone can help!!&lt;BR /&gt;&lt;BR /&gt;I am using Goodies(APIAny_ActParametersID, &amp;amp;getParams, Nullptr);&lt;BR /&gt;&lt;BR /&gt;getParams-&amp;gt;params (API_AddParType) returns a pointer to a list of the parameters in a Library Part&lt;BR /&gt;&lt;BR /&gt;How do I get the number parameters pointed to in order to iterate through the list and find the parameter I'm interested in?? I tried sizeof and just got garbage , so doing something wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:39:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262189#M2062</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2021-09-14T07:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pointer Array Length</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262190#M2063</link>
      <description>This one is a bit tricky. Here is the relevant code from Element_Test Add-On:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;API_GetParamsType getParams;
BNZeroMemory (&amp;amp;getParams, sizeof (API_GetParamsType));
err = ACAPI_Goodies (APIAny_GetActParametersID, &amp;amp;getParams);
if (err == NoError) {
	UInt32 nParams = BMGetHandleSize ((GSHandle) getParams.params) / sizeof (API_AddParType);
	for (UInt32 ii = 0; ii &amp;lt; nParams; ++ii) {
		const API_AddParType&amp;amp; actParam = (*getParams.params)[ii];
		DBPrintf ("%-3u. param: \"%s\" (%s)\n", ii, actParam.name, (actParam.flags &amp;amp; API_ParFlg_Disabled) != 0 ? "disabled" : "");
	}
}
ACAPI_Goodies (APIAny_CloseParametersID);
ACAPI_DisposeAddParHdl (&amp;amp;getParams.params);
&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Apr 2021 14:22:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262190#M2063</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-04-26T14:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pointer Array Length</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262191#M2064</link>
      <description>Thanks Viklor:&lt;BR /&gt;

&lt;PRE&gt;UInt32 nParams = BMGetHandleSize ((GSHandle) getParams.params) / sizeof (API_AddParType);&lt;/PRE&gt;

was exactly what I was looking for. Don't know how I missed it but I did.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again</description>
      <pubDate>Mon, 26 Apr 2021 16:41:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Pointer-Array-Length/m-p/262191#M2064</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2021-04-26T16:41:47Z</dc:date>
    </item>
  </channel>
</rss>

