<?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: ACAPI_Element_UnLink issues in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214042#M6100</link>
    <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt; That looks OK to me. Are you doing this within an Undo session, i.e. using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_OpenUndoableSession&lt;E&gt;&lt;/E&gt;?&lt;/BLOCKQUOTE&gt;

Yes, Of course. I am sure.</description>
    <pubDate>Wed, 13 Oct 2010 01:31:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-10-13T01:31:21Z</dc:date>
    <item>
      <title>ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214036#M6094</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;After used ACAPI_Element_UnLink to delete all links of an element , the number of the links got by ACAPI_Element_GetLinks is still not zero.&lt;BR /&gt;(The links is created and deleted by the same add-on, alos set undo functions )&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:54:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214036#M6094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T08:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214037#M6095</link>
      <description>&lt;BLOCKQUOTE&gt;wcyoot wrote:&lt;BR /&gt;After used ACAPI_Element_UnLink to delete all links of an element , the number of the links got by ACAPI_Element_GetLinks is still not zero.&lt;BR /&gt;
(The links is created and deleted by the same add-on, alos set undo functions )&lt;/BLOCKQUOTE&gt;
Are you first calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetLinks&lt;E&gt;&lt;/E&gt; to retrieve a list of linked elements, and then repeatedly calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; to remove each link? Does &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; return an error? And are you sure the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;guid_linkFrom&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;guid_linkTo&lt;E&gt;&lt;/E&gt; parameters are in the right order?</description>
      <pubDate>Mon, 11 Oct 2010 09:54:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214037#M6095</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-10-11T09:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214038#M6096</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;
Are you first calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetLinks&lt;E&gt;&lt;/E&gt; to retrieve a list of linked elements, and then repeatedly calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; to remove each link? Does &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; return an error? And are you sure the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;guid_linkFrom&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;guid_linkTo&lt;E&gt;&lt;/E&gt; parameters are in the right order?&lt;/BLOCKQUOTE&gt;

Yes, I am first calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetLinks&lt;E&gt;&lt;/E&gt;, and then calling  &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; one by one, and  sure &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; returns no error, and sure parameters are in the right order</description>
      <pubDate>Mon, 11 Oct 2010 13:04:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214038#M6096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-11T13:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214039#M6097</link>
      <description>&lt;BLOCKQUOTE&gt;wcyoot wrote:&lt;BR /&gt;Yes, I am first calling &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetLinks&lt;E&gt;&lt;/E&gt;, and then calling  &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; one by one, and  sure &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_UnLink&lt;E&gt;&lt;/E&gt; returns no error, and sure parameters are in the right order&lt;/BLOCKQUOTE&gt;
I'm not sure what else to suggest - this call works for me. Which version of ArchiCAD are you developing for? Can you post some of the essential code that demonstrates this problem?</description>
      <pubDate>Mon, 11 Oct 2010 17:32:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214039#M6097</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-10-11T17:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214040#M6098</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;I'm not sure what else to suggest - this call works for me. Which version of ArchiCAD are you developing for? Can you post some of the essential code that demonstrates this problem?&lt;/BLOCKQUOTE&gt;

AC13. &lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;err = ACAPI_Element_Get (&amp;amp;element);
API_Guid		linkFrom = element.header.guid;
API_Guid**		linkToList = NULL;
err = ACAPI_Element_GetLinks (linkFrom, &amp;amp;linkToList, &amp;amp;nLinks);	
   for (GSIndex index = 0; index &amp;lt; nLinks; index++) {
   err = ACAPI_Element_Unlink (linkFrom, (*linkToList)[index]);
      }
BMKillHandle ((GSHandle *) &amp;amp;linkToList);
Int32 nLinksTemp = 0;
err = ACAPI_Element_GetLinks(linkFrom, NULL, &amp;amp;nLinksTemp);
// There nLinksTemp is not zero
&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2010 06:05:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214040#M6098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-12T06:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214041#M6099</link>
      <description>&lt;BLOCKQUOTE&gt;wcyoot wrote:&lt;BR /&gt;AC13. 
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;err = ACAPI_Element_Get (&amp;amp;element);
API_Guid		linkFrom = element.header.guid;
API_Guid**		linkToList = NULL;
err = ACAPI_Element_GetLinks (linkFrom, &amp;amp;linkToList, &amp;amp;nLinks);	
   for (GSIndex index = 0; index &amp;lt; nLinks; index++) {
   err = ACAPI_Element_Unlink (linkFrom, (*linkToList)[index]);
      }
BMKillHandle ((GSHandle *) &amp;amp;linkToList);
Int32 nLinksTemp = 0;
err = ACAPI_Element_GetLinks(linkFrom, NULL, &amp;amp;nLinksTemp);
// There nLinksTemp is not zero
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
That looks OK to me. Are you doing this within an Undo session, i.e. using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_OpenUndoableSession&lt;E&gt;&lt;/E&gt;?</description>
      <pubDate>Tue, 12 Oct 2010 11:37:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214041#M6099</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-10-12T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214042#M6100</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt; That looks OK to me. Are you doing this within an Undo session, i.e. using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_OpenUndoableSession&lt;E&gt;&lt;/E&gt;?&lt;/BLOCKQUOTE&gt;

Yes, Of course. I am sure.</description>
      <pubDate>Wed, 13 Oct 2010 01:31:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214042#M6100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-13T01:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214043#M6101</link>
      <description>&lt;BLOCKQUOTE&gt;wcyoot wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt; That looks OK to me. Are you doing this within an Undo session, i.e. using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_OpenUndoableSession&lt;E&gt;&lt;/E&gt;?&lt;/BLOCKQUOTE&gt;
Yes, Of course. I am sure.&lt;/BLOCKQUOTE&gt;
These functions work for me, so I don't know what else to suggest. I recommend cutting the add-on functionality down to the bare minimum required to test this code. Then you can be sure that the problem isn't caused by some earlier corruption.</description>
      <pubDate>Wed, 13 Oct 2010 08:07:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214043#M6101</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-10-13T08:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_UnLink issues</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214044#M6102</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;These functions work for me, so I don't know what else to suggest. I recommend cutting the add-on functionality down to the bare minimum required to test this code. Then you can be sure that the problem isn't caused by some earlier corruption.&lt;/BLOCKQUOTE&gt;

In my test, there is nothing else to do.&lt;BR /&gt;
&lt;BR /&gt;
Maybe it is a bug.</description>
      <pubDate>Thu, 14 Oct 2010 02:50:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-UnLink-issues/m-p/214044#M6102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-14T02:50:33Z</dc:date>
    </item>
  </channel>
</rss>

