<?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: APIERR_MEMFULL LibPart_Register in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222397#M4910</link>
    <description>&lt;BLOCKQUOTE&gt;Rinovo wrote:&lt;BR /&gt;Thanks Akos! &lt;BR /&gt;
 &lt;BR /&gt;
I was trying to add library part to embedded library. &lt;BR /&gt;
I guess only way would be to make new one through creating new one.&lt;/BLOCKQUOTE&gt;

Yeah, you can create one directly in the embedded library:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	IO::Location file;
	GS::UniString str;
	GetIndString (str, 32552, 1);  // default name
	ACAPI_Interface (APIIo_GetLastValidEmbeddedLPNameID, &amp;amp;str, &amp;amp;file);

	// Save As dialog
	bool bff = false;
	bool retIsOk;
	ACAPI_Interface (APIIo_SaveLibPartFileDialogID, &amp;amp;retIsOk, &amp;amp;file, &amp;amp;bff, &amp;amp;str);

	if (retIsOk) {
		// Create the libpart
		API_LibPart libPart;
		CreateLibpart (libPart, file);
	}
&lt;/PRE&gt;

You can skip the save dialog, just use the location from the APIIo_GetLastValidEmbeddedLPNameID call (but don't forget to replace the last local name).&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
    <pubDate>Wed, 14 Oct 2015 11:54:01 GMT</pubDate>
    <dc:creator>Akos Somorjai</dc:creator>
    <dc:date>2015-10-14T11:54:01Z</dc:date>
    <item>
      <title>APIERR_MEMFULL LibPart_Register</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222394#M4907</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;
&lt;PRE&gt;IO::Location     fileLoc ("C:\\temp\\MyLibpart.gsm"); 
API_LibPart      libPart; 
GSErrCode        err; 
 
BNZeroMemory (&amp;amp;libPart, sizeof (API_LibPart)); 
libPart.typeID   = APILib_ObjectID; 
libPart.location = &amp;amp;fileLoc; 
err = ACAPI_LibPart_Register (&amp;amp;libPart);&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;Any ideas why i'm getting MEMFULL error ?&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:20:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222394#M4907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T13:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: APIERR_MEMFULL LibPart_Register</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222395#M4908</link>
      <description>&lt;BLOCKQUOTE&gt;Rinovo wrote:&lt;BR /&gt;&lt;PRE&gt;IO::Location     fileLoc ("C:\\temp\\MyLibpart.gsm"); 
API_LibPart      libPart; 
GSErrCode        err; 
 
BNZeroMemory (&amp;amp;libPart, sizeof (API_LibPart)); 
libPart.typeID   = APILib_ObjectID; 
libPart.location = &amp;amp;fileLoc; 
err = ACAPI_LibPart_Register (&amp;amp;libPart);&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
Any ideas why i'm getting MEMFULL error ?&lt;/BLOCKQUOTE&gt;

I agree that this is a misleading error. The problem is that you are trying to register a library part which is not in the embedded library.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Mon, 12 Oct 2015 11:50:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222395#M4908</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2015-10-12T11:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: APIERR_MEMFULL LibPart_Register</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222396#M4909</link>
      <description>Thanks Akos! &lt;BR /&gt;
 &lt;BR /&gt;
I was trying to add library part to embedded library. &lt;BR /&gt;
I guess only way would be to make new one through creating new one.</description>
      <pubDate>Tue, 13 Oct 2015 06:45:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222396#M4909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-13T06:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: APIERR_MEMFULL LibPart_Register</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222397#M4910</link>
      <description>&lt;BLOCKQUOTE&gt;Rinovo wrote:&lt;BR /&gt;Thanks Akos! &lt;BR /&gt;
 &lt;BR /&gt;
I was trying to add library part to embedded library. &lt;BR /&gt;
I guess only way would be to make new one through creating new one.&lt;/BLOCKQUOTE&gt;

Yeah, you can create one directly in the embedded library:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	IO::Location file;
	GS::UniString str;
	GetIndString (str, 32552, 1);  // default name
	ACAPI_Interface (APIIo_GetLastValidEmbeddedLPNameID, &amp;amp;str, &amp;amp;file);

	// Save As dialog
	bool bff = false;
	bool retIsOk;
	ACAPI_Interface (APIIo_SaveLibPartFileDialogID, &amp;amp;retIsOk, &amp;amp;file, &amp;amp;bff, &amp;amp;str);

	if (retIsOk) {
		// Create the libpart
		API_LibPart libPart;
		CreateLibpart (libPart, file);
	}
&lt;/PRE&gt;

You can skip the save dialog, just use the location from the APIIo_GetLastValidEmbeddedLPNameID call (but don't forget to replace the last local name).&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Wed, 14 Oct 2015 11:54:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-MEMFULL-LibPart-Register/m-p/222397#M4910</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2015-10-14T11:54:01Z</dc:date>
    </item>
  </channel>
</rss>

