<?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: Need help on ACAPI_LibPart_UpdateSection in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134042#M6124</link>
    <description>&lt;BLOCKQUOTE&gt;Hoa wrote:&lt;BR /&gt;I am trying to change the subtype of a library part using the ACAPI_LibPart_UpdateSection function as the following code segment:&lt;/BLOCKQUOTE&gt;
Have you tried 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;APIEnv_OverwriteLibPartID&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;ACAPI_LibPart_Create&lt;E&gt;&lt;/E&gt; to change the object?</description>
    <pubDate>Thu, 18 Nov 2010 12:33:34 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2010-11-18T12:33:34Z</dc:date>
    <item>
      <title>Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134041#M6123</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;I am trying to change the subtype of a library part using the ACAPI_LibPart_UpdateSection function as the following code segment: &lt;BR /&gt;&lt;BR /&gt;// ---------------------------------------------------------------- &lt;BR /&gt;char buffer[1000]; &lt;BR /&gt;&lt;BR /&gt;API_LibPartSection section; &lt;BR /&gt;GSHandle sectionHdl; &lt;BR /&gt;&lt;BR /&gt;BNZeroMemory (&amp;amp;section, sizeof (API_LibPartSection)); &lt;BR /&gt;section.sectType = API_SectAncestors; &lt;BR /&gt;&lt;BR /&gt;sectionHdl = NULL; &lt;BR /&gt;&lt;BR /&gt;// ModelElemID definded as: &lt;BR /&gt;// #define ModelElemID "{103E8D2C-8230-42E1-9597-46F84CCE28C0}-{00000000-0000-0000-0000-000000000000}" &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;strcpy_s (buffer, sizeof (buffer), ModelElemID); &lt;BR /&gt;&lt;BR /&gt;sectionHdl = BMAllocateHandle (strlen(buffer), ALLOCATE_CLEAR, 0); &lt;BR /&gt;if (sectionHdl != NULL) { &lt;BR /&gt;memcpy (*sectionHdl, buffer, strlen(buffer)); &lt;BR /&gt;err = ACAPI_LibPart_UpdateSection (libPart.index, &amp;amp;section, sectionHdl, NULL); &lt;BR /&gt;if (err) { &lt;BR /&gt;WriteReport_Err (err, "[Do_UpdateLibraryPart]Error in ACAPI_LibPart_UpdateSection, API_SectAncestors, libPart.index = %d", libPart.index); &lt;BR /&gt;} &lt;BR /&gt;BMKillHandle ((GSHandle*) &amp;amp;sectionHdl); &lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// ---------------------------------------------------------------- &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It does not seem to work. The updated object has the subtype shown as unknown subtype. I have updated other sections of the libpart such as API_Sect1DScript, API_Sect2DScript... ok. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help. Thanks in advance. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards, &lt;BR /&gt;&lt;BR /&gt;Hoa TU &lt;BR /&gt;&lt;BR /&gt;PS. This is developed for ArchiCAD 12&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Sep 2024 08:55:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134041#M6123</guid>
      <dc:creator>Hoa Tu</dc:creator>
      <dc:date>2024-09-09T08:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134042#M6124</link>
      <description>&lt;BLOCKQUOTE&gt;Hoa wrote:&lt;BR /&gt;I am trying to change the subtype of a library part using the ACAPI_LibPart_UpdateSection function as the following code segment:&lt;/BLOCKQUOTE&gt;
Have you tried 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;APIEnv_OverwriteLibPartID&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;ACAPI_LibPart_Create&lt;E&gt;&lt;/E&gt; to change the object?</description>
      <pubDate>Thu, 18 Nov 2010 12:33:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134042#M6124</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-11-18T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134043#M6125</link>
      <description>&lt;BLOCKQUOTE&gt;Have you tried using APIEnv_OverwriteLibPartID and ACAPI_LibPart_Create to change the object?&lt;/BLOCKQUOTE&gt;

Ralph,&lt;BR /&gt;
Thanks for your suggestion, but I can not use the ACAPI_LibPart_Create, because it will change the GUID of the object.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Hoa</description>
      <pubDate>Thu, 18 Nov 2010 23:47:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134043#M6125</guid>
      <dc:creator>Hoa Tu</dc:creator>
      <dc:date>2010-11-18T23:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134044#M6126</link>
      <description>&lt;BLOCKQUOTE&gt;Hoa wrote:&lt;BR /&gt;Thanks for your suggestion, but I can not use the ACAPI_LibPart_Create, because it will change the GUID of the object.&lt;/BLOCKQUOTE&gt;
Not if you use it with &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIEnv_OverwriteLibPartID&lt;E&gt;&lt;/E&gt;. My understanding is that this will become a new revision of the same object, i.e. any projects referencing the object will still recognise it from the GUID.</description>
      <pubDate>Fri, 19 Nov 2010 10:22:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134044#M6126</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-11-19T10:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134045#M6127</link>
      <description>Ralph,&lt;BR /&gt;
Thanks. I will have a close look at your suggestion and will let you know the outcome of it.&lt;BR /&gt;
Regards,&lt;BR /&gt;
Hoa</description>
      <pubDate>Sun, 21 Nov 2010 22:29:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134045#M6127</guid>
      <dc:creator>Hoa Tu</dc:creator>
      <dc:date>2010-11-21T22:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on ACAPI_LibPart_UpdateSection</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134046#M6128</link>
      <description>I have tried using APIEnv_OverwriteLibPartID and ACAPI_LibPart_Create to change the subtype of the object. Well the result is interesting:&lt;BR /&gt;
&lt;BR /&gt;
With ArchiCAD 12, the GUID of the object changed, so any object placed before the change will not be recognisable any more. &lt;BR /&gt;
&lt;BR /&gt;
With ArchiCAD 14, the GUID of the object remained the same, so everything seems ok.&lt;BR /&gt;
&lt;BR /&gt;
Since we are going to use AC14 soon, so I am not going to worry about the AC12 problem.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Hoa</description>
      <pubDate>Tue, 23 Nov 2010 03:48:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Need-help-on-ACAPI-LibPart-UpdateSection/m-p/134046#M6128</guid>
      <dc:creator>Hoa Tu</dc:creator>
      <dc:date>2010-11-23T03:48:00Z</dc:date>
    </item>
  </channel>
</rss>

