<?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 Re: Why null char[] checking not working? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387111#M964</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;A class="" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527" target="_self"&gt;&lt;SPAN class=""&gt;bschwb&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're right, It does what I am looking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 02:49:45 GMT</pubDate>
    <dc:creator>Newbie</dc:creator>
    <dc:date>2023-07-12T02:49:45Z</dc:date>
    <item>
      <title>Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386756#M958</link>
      <description>&lt;P&gt;I am try to put a condition checking for empty value of char[] as below code but still not working.&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="cpp"&gt;GS::Array&amp;lt;API_NavigatorItem&amp;gt; items;
API_NavigatorItem item = {};
char str[128];
memset(str, '\0', sizeof(str));
item.guid = guid;
item.mapId = mapId; //NavigatorPaletteTestGlobals::GetInstance().GetNavigatorMapID();
GSErrCode err = ACAPI_Navigator(APINavigator_GetNavigatorChildrenItemsID, &amp;amp;item, nullptr, &amp;amp;items);
if (err != NoError)
return;
for (API_NavigatorItem&amp;amp; childItem : items) {
if (GS::UniString(childItem.uiId).ToCStr().Get() != NULL) {
ACAPI_WriteReport("Value &amp;gt;&amp;gt;%s&amp;lt;&amp;gt;%s =&amp;gt;%i", true, GS::UniString(childItem.uiId).ToCStr().Get(), GS::UniString(str).ToCStr().Get(),childItem.isIndependent);
}
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Appreciated for any help to fix this issue.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 17 Jul 2023 20:13:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386756#M958</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2023-07-17T20:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386767#M959</link>
      <description>&lt;P&gt;I think this condition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::UniString(childItem.uiId).ToCStr().Get() != NULL&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will never be true, since you are creating an UniString object right there and this will have a pointer existing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a bit unclear what exactly you want to achieve.&lt;/P&gt;
&lt;P&gt;Maybe you need this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;!GS::UniString(childItem.uiId).IsEmpty()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 06:44:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386767#M959</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-07-10T06:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386785#M960</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A class="" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527" target="_self"&gt;&lt;SPAN class=""&gt;bschwb&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I want to list the viewmap of navigator and check whether the item can be deleted or not as below picture but still can't find our the way.&lt;/P&gt;&lt;P&gt;Not sure you have any suggestion or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/56760iC66195E5C606EEE9/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Snap-2023-07-10-14-54-23.png" title="Snap-2023-07-10-14-54-23.png" /&gt;</description>
      <pubDate>Mon, 10 Jul 2023 08:24:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386785#M960</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2023-07-10T08:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386978#M961</link>
      <description>&lt;P&gt;Which ones in the picture do you want to delete?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 11:31:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/386978#M961</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-07-11T11:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387022#M962</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A class="" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527" target="_self"&gt;&lt;SPAN class=""&gt;bschwb&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the given picture, if you select 'Floor Plans' then you can delete, but it's sub items such as story 1 you can't delete. I still can't find way to check whether the selected item can or can not delete from API function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 14:24:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387022#M962</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2023-07-11T14:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387062#M963</link>
      <description>&lt;P&gt;OK now I think I've understood. And I've tested it a bit.&lt;BR /&gt;It seems that you can't delete items which are part of a cloned folder as you've found out.&lt;BR /&gt;The cloned folders have &lt;STRONG&gt;itemType = API_UndefinedNavItem&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;So you could check if an items parent has this item type.&lt;/P&gt;
&lt;P&gt;To get an items parent you can use &lt;STRONG&gt;APINavigator_GetNavigatorParentItemID&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 19:53:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387062#M963</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-07-11T19:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why null char[] checking not working?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387111#M964</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A class="" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527" target="_self"&gt;&lt;SPAN class=""&gt;bschwb&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're right, It does what I am looking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 02:49:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-null-char-checking-not-working/m-p/387111#M964</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2023-07-12T02:49:45Z</dc:date>
    </item>
  </channel>
</rss>

