<?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 [SOLVED] From .gsm file to embedded library in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229895#M3939</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;What would be the best way to store a .gsm file as a new API_LibPart object in embedded library?&lt;BR /&gt;&lt;BR /&gt;Is it possible to fill LibPart sections from gsm file?&lt;BR /&gt;&lt;BR /&gt;Currently I am adding a new linked library APIEnv_AddLibrariesID, search for object by name with ACAPI_LibPart_Search and copy sections manually to a new libpart created with ACAPI_LibPart_Create... which is a bit tedious, besides I cannot remove linked /tmp/ library.&lt;/DIV&gt;</description>
    <pubDate>Tue, 06 Dec 2022 13:01:09 GMT</pubDate>
    <dc:creator>Miha Nahtigal</dc:creator>
    <dc:date>2022-12-06T13:01:09Z</dc:date>
    <item>
      <title>[SOLVED] From .gsm file to embedded library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229895#M3939</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;What would be the best way to store a .gsm file as a new API_LibPart object in embedded library?&lt;BR /&gt;&lt;BR /&gt;Is it possible to fill LibPart sections from gsm file?&lt;BR /&gt;&lt;BR /&gt;Currently I am adding a new linked library APIEnv_AddLibrariesID, search for object by name with ACAPI_LibPart_Search and copy sections manually to a new libpart created with ACAPI_LibPart_Create... which is a bit tedious, besides I cannot remove linked /tmp/ library.&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2022 13:01:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229895#M3939</guid>
      <dc:creator>Miha Nahtigal</dc:creator>
      <dc:date>2022-12-06T13:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: From .gsm file to embedded library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229896#M3940</link>
      <description>Found a solution:&lt;BR /&gt;

&lt;PRE&gt;IO::Location rab("C:/GDLTest/11204.gsm");

	GSErrCode err;
	auto folderId = API_SpecFolderID::API_EmbeddedProjectLibraryFolderID;

	IO::Location embeddedLibraryFolder;

	if (ACAPI_Environment(APIEnv_GetSpecFolderID, &amp;amp;folderId, &amp;amp;embeddedLibraryFolder) == NoError &amp;amp;&amp;amp; IO::Folder(embeddedLibraryFolder).GetStatus() == NoError) {
		// copy file to embedded folder
		IO::Location destFolder = embeddedLibraryFolder;
		destFolder.AppendToLocal(IO::Name("11204.gsm"));

		err = IO::fileSystem.Copy(rab, destFolder);

		API_LibPart libPart;
		BNZeroMemory(&amp;amp;libPart, sizeof(API_LibPart));

		libPart.typeID = APILib_ObjectID;
		libPart.location = &amp;amp;destFolder;

		err = ACAPI_LibPart_Register(&amp;amp;libPart);

	}&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2017 08:12:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229896#M3940</guid>
      <dc:creator>Miha Nahtigal</dc:creator>
      <dc:date>2017-09-17T08:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: From .gsm file to embedded library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229897#M3941</link>
      <description>&lt;BLOCKQUOTE&gt;vuego wrote:&lt;BR /&gt;Found a solution:&lt;BR /&gt;
...
&lt;/BLOCKQUOTE&gt;

Alternatively, you can create a new library part (ACAPI_LibPart_Create), that puts it directly into the embedded library. Also, you can assemble the library part with ACAPI_LibPart_AddSection or ACAPI_LibPart_NewSection calls.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Mon, 18 Sep 2017 06:54:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-From-gsm-file-to-embedded-library/m-p/229897#M3941</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2017-09-18T06:54:16Z</dc:date>
    </item>
  </channel>
</rss>

