<?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: How to get thumbnail and parameters from external library part? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273064#M4036</link>
    <description>&lt;BLOCKQUOTE&gt;Twily wrote:&lt;BR /&gt;result is &lt;BR /&gt;
Register Error : -2130313214&lt;BR /&gt;
Create Error : -2130312314&lt;BR /&gt;
I tried to find the error code but i can't find :'(&lt;/BLOCKQUOTE&gt;
That error is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIERR_MEMFULL&lt;E&gt;&lt;/E&gt; (Insufficient memory), which is odd. In what context are you trying to register the library part, e.g. in response to a menu item click?</description>
    <pubDate>Wed, 07 Mar 2018 09:38:56 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2018-03-07T09:38:56Z</dc:date>
    <item>
      <title>How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273059#M4031</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi everyone,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i'm tried from figure out to get thumbnail and parameters from external library part but failed.&lt;BR /&gt;&lt;BR /&gt;For example :
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	IO::Location fileLoc("C:\\Users\\W.C.SHIM\\Downloads\\test.gsm");
	API_LibPart      libPart;

	BNZeroMemory(&amp;amp;libPart, sizeof(API_LibPart));
	libPart.typeID = APILib_ObjectID;
	libPart.location = &amp;amp;fileLoc;
	ACAPI_LibPart_Register(&amp;amp;libPart);
&lt;/PRE&gt;
but it doesnt work :'(&lt;BR /&gt;&lt;BR /&gt;so... can i do this?&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 15:48:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273059#M4031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T15:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273060#M4032</link>
      <description>The quoted code should register the library part with ARCHICAD as part of the loaded library. Does that work, i.e. does it return &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;NoError&lt;E&gt;&lt;/E&gt; and is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;libPart.index&lt;E&gt;&lt;/E&gt; non-zero?&lt;BR /&gt;
&lt;BR /&gt;
If so, use the returned index to call &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_GetSectionList&lt;E&gt;&lt;/E&gt;. The parameters, scripts and preview image are all stored in the returned sections. Each section has an ID for the data it contains, e.g. the parameters ID is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_SectParamDef&lt;E&gt;&lt;/E&gt; and the preview image is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_SectInfoGIF&lt;E&gt;&lt;/E&gt;.</description>
      <pubDate>Mon, 05 Mar 2018 11:57:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273060#M4032</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-03-05T11:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273061#M4033</link>
      <description>oooo... my mistake :'(  i want load a .gsm file. &lt;B&gt;not use part of the loaded library&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
(just open and use gsm file programmatically)&lt;BR /&gt;
&lt;BR /&gt;
i tried ACAPI_LibPart_Create and ACAPI_LibPart_Register. but libpart.index is always 0.</description>
      <pubDate>Tue, 06 Mar 2018 00:43:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273061#M4033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-06T00:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273062#M4034</link>
      <description>&lt;BLOCKQUOTE&gt;Twily wrote:&lt;BR /&gt;oooo... my mistake :'(  i want load a .gsm file. &lt;B&gt;not use part of the loaded library&lt;/B&gt;&lt;BR /&gt;
(just open and use gsm file programmatically)&lt;BR /&gt;
i tried ACAPI_LibPart_Create and ACAPI_LibPart_Register. but libpart.index is always 0.&lt;/BLOCKQUOTE&gt;
&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_Register&lt;E&gt;&lt;/E&gt; effectively includes the gsm in the loaded library –&amp;nbsp;you can't work with it otherwise. The value of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;libpart.index&lt;E&gt;&lt;/E&gt; is the object's index in the loaded library.&lt;BR /&gt;
&lt;BR /&gt;
Do you get an error code returned from &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_Register&lt;E&gt;&lt;/E&gt;?</description>
      <pubDate>Tue, 06 Mar 2018 08:35:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273062#M4034</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-03-06T08:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273063#M4035</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;
&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_Register&lt;E&gt;&lt;/E&gt; effectively includes the gsm in the loaded library –&amp;nbsp;you can't work with it otherwise. The value of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;libpart.index&lt;E&gt;&lt;/E&gt; is the object's index in the loaded library.&lt;BR /&gt;
&lt;BR /&gt;
Do you get an error code returned from &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_Register&lt;E&gt;&lt;/E&gt;?&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
I tried this :
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	IO::Location fileLoc("C:\\Users\\W.C.SHIM\\Downloads\\test.gsm");
	API_LibPart      libPart;
	GSErrCode err = NoError;

	BNZeroMemory(&amp;amp;libPart, sizeof(API_LibPart));
	libPart.typeID = APILib_ObjectID;
	libPart.location = &amp;amp;fileLoc;
	err = ACAPI_LibPart_Register(&amp;amp;libPart);
	if (err != NoError)
	{
		char msgStr[256];
		sprintf(msgStr, "Register Error : %d", (int)err);
		ACAPI_WriteReport(msgStr, true);
	}

	err = ACAPI_LibPart_Create(&amp;amp;libPart);
	if (err != NoError)
	{
		char msgStr[256];
		sprintf(msgStr, "Create Error : %d", (int)err);
		ACAPI_WriteReport(msgStr, true);
	}
&lt;/PRE&gt;

result is &lt;BR /&gt;
&lt;BR /&gt;
Register Error : -2130313214&lt;BR /&gt;
Create Error : -2130312314&lt;BR /&gt;
&lt;BR /&gt;
I tried to find the error code but i can't find :'(</description>
      <pubDate>Tue, 06 Mar 2018 09:07:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273063#M4035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-06T09:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273064#M4036</link>
      <description>&lt;BLOCKQUOTE&gt;Twily wrote:&lt;BR /&gt;result is &lt;BR /&gt;
Register Error : -2130313214&lt;BR /&gt;
Create Error : -2130312314&lt;BR /&gt;
I tried to find the error code but i can't find :'(&lt;/BLOCKQUOTE&gt;
That error is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIERR_MEMFULL&lt;E&gt;&lt;/E&gt; (Insufficient memory), which is odd. In what context are you trying to register the library part, e.g. in response to a menu item click?</description>
      <pubDate>Wed, 07 Mar 2018 09:38:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273064#M4036</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-03-07T09:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273065#M4037</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Twily wrote:&lt;BR /&gt;result is &lt;BR /&gt;
Register Error : -2130313214&lt;BR /&gt;
Create Error : -2130312314&lt;BR /&gt;
I tried to find the error code but i can't find :'(&lt;/BLOCKQUOTE&gt;
That error is &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIERR_MEMFULL&lt;E&gt;&lt;/E&gt; (Insufficient memory), which is odd. In what context are you trying to register the library part, e.g. in response to a menu item click?&lt;/BLOCKQUOTE&gt;

yes, i'm testing to menu item click.&lt;BR /&gt;
But later i will use immediately after open archicad.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I want this method (in automatically) :&lt;BR /&gt;
&lt;BR /&gt;
after open archicad (load addon) -&amp;gt; &lt;BR /&gt;
load gsm file -&amp;gt; &lt;BR /&gt;
get thumbnail and parameters -&amp;gt; &lt;BR /&gt;
close gsm file.</description>
      <pubDate>Wed, 07 Mar 2018 10:07:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273065#M4037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-07T10:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get thumbnail and parameters from external library part?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273066#M4038</link>
      <description>&lt;BLOCKQUOTE&gt;Twily wrote:&lt;BR /&gt;yes, i'm testing to menu item click.&lt;BR /&gt;
But later i will use immediately after open archicad.&lt;BR /&gt;
I want this method (in automatically) :&lt;BR /&gt;
after open archicad (load addon) -&amp;gt; &lt;BR /&gt;
load gsm file -&amp;gt; &lt;BR /&gt;
get thumbnail and parameters -&amp;gt; &lt;BR /&gt;
close gsm file.&lt;/BLOCKQUOTE&gt;
That code should work in the right context – it looks practically identical to the documentation example. Perhaps try building one of the example projects – LibPart_Test&amp;nbsp;– that uses this function. See if it works in that context and work back from there.</description>
      <pubDate>Thu, 08 Mar 2018 13:44:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-thumbnail-and-parameters-from-external-library-part/m-p/273066#M4038</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-03-08T13:44:18Z</dc:date>
    </item>
  </channel>
</rss>

