<?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: Get the Type ID and Variation ID from API_LibPart in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258637#M4991</link>
    <description>&lt;BLOCKQUOTE&gt;gehairing wrote:&lt;BR /&gt;i need to know what is exactly the library part.&lt;BR /&gt;
(a stair, a window, a door, a wall...). [...] How can i find "element.header.typeID" and "element.header.variationID" from a API_LibPart ? I have the "API_LibTypeID" but this is not enough. By example, i can't know that a libpart is a "stair" by example.&lt;/BLOCKQUOTE&gt;
You could deduce this from the library part subtype, &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_LibPart::ownUnID&lt;E&gt;&lt;/E&gt;. Its ancestry would determine what tool/type it's related to.</description>
    <pubDate>Fri, 19 Feb 2016 09:54:43 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2016-02-19T09:54:43Z</dc:date>
    <item>
      <title>Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258636#M4990</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello the forum &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;BR /&gt;&lt;BR /&gt;I download library parts and insert them in Archicad projects.&lt;BR /&gt;To do the job correctly i need to know what is exactly the library part.&lt;BR /&gt;(a stair, a window, a door, a wall...)&lt;BR /&gt;&lt;BR /&gt;For the moment i have this info in xml side-car files so i know exactly the type of the library part. I can fill in the "element.header.typeID" and "element.header.variationID" based on the data i have in my XML side-car.&lt;BR /&gt;&lt;BR /&gt;But...&lt;BR /&gt;&lt;BR /&gt;For some of my library parts i don't have the XML data so i don't know the type of the libpart.&lt;BR /&gt;&lt;BR /&gt;How can i find "element.header.typeID" and "element.header.variationID" from a API_LibPart ?&lt;BR /&gt;&lt;BR /&gt;I have the "API_LibTypeID" but this is not enough. By example, i can't know that a libpart is a "stair" by example.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 19:11:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258636#M4990</guid>
      <dc:creator>gehairing</dc:creator>
      <dc:date>2023-07-12T19:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258637#M4991</link>
      <description>&lt;BLOCKQUOTE&gt;gehairing wrote:&lt;BR /&gt;i need to know what is exactly the library part.&lt;BR /&gt;
(a stair, a window, a door, a wall...). [...] How can i find "element.header.typeID" and "element.header.variationID" from a API_LibPart ? I have the "API_LibTypeID" but this is not enough. By example, i can't know that a libpart is a "stair" by example.&lt;/BLOCKQUOTE&gt;
You could deduce this from the library part subtype, &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_LibPart::ownUnID&lt;E&gt;&lt;/E&gt;. Its ancestry would determine what tool/type it's related to.</description>
      <pubDate>Fri, 19 Feb 2016 09:54:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258637#M4991</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2016-02-19T09:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258638#M4992</link>
      <description>Thank you for the answer...but i don't understand what you mean.&lt;BR /&gt;
Do you mean the ownUnID can give me an element from wich i can extract typeID and VariationID ?&lt;BR /&gt;
&lt;BR /&gt;
I have tried playing around with something like this :&lt;BR /&gt;

        &lt;PRE&gt;GS::UniString s = libPart.ownUnID;
	GS::Guid gs_guid(s);
	API_Element  element;
	BNZeroMemory (&amp;amp;element, sizeof (API_Element));
	element.header.guid  = GSGuid2APIGuid (gs_guid);
	GSErrCode err = ACAPI_Element_Get(&amp;amp;element);
	if(err == NoError)
	{
		typeID = element.header.typeID;
		variationID = element.header.variationID;
	}&lt;/PRE&gt;

But because i don't really know what it means i can't say why it doesn't work  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 22 Feb 2016 10:00:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258638#M4992</guid>
      <dc:creator>gehairing</dc:creator>
      <dc:date>2016-02-22T10:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258639#M4993</link>
      <description>&lt;BLOCKQUOTE&gt;gehairing wrote:&lt;BR /&gt;Do you mean the ownUnID can give me an element from wich i can extract typeID and VariationID ?&lt;/BLOCKQUOTE&gt;
Library parts are organised in a hierarchical structure, so the 'subtype' of an object determines its parent and therefore its 'type'. If you refer to the attached image, you can see the ARCHICAD Subtype selection dialog with the Stairmaker  subtype selected. This would make the object a type of 'Stair' (and also a type of 'Model Element').&lt;BR /&gt;
&lt;BR /&gt;
You can use the subtype of your library parts to determine if they are descended from specific types, and therefore determine which tool they are associated with.</description>
      <pubDate>Mon, 22 Feb 2016 12:02:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258639#M4993</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2016-02-22T12:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258640#M4994</link>
      <description>Thank you Ralph.&lt;BR /&gt;
&lt;BR /&gt;
Sorry, I don't understand how can i access the subType you talk about ?</description>
      <pubDate>Tue, 23 Feb 2016 17:26:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258640#M4994</guid>
      <dc:creator>gehairing</dc:creator>
      <dc:date>2016-02-23T17:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Type ID and Variation ID from API_LibPart</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258641#M4995</link>
      <description>&lt;BLOCKQUOTE&gt;gehairing wrote:&lt;BR /&gt;Sorry, I don't understand how can i access the subType you talk about ?&lt;/BLOCKQUOTE&gt;
For background information, look at 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;Library Part Subtypes&lt;E&gt;&lt;/E&gt; documentation with the API. There is a link to it from 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;API_LibPart&lt;E&gt;&lt;/E&gt; page. The subtype identifier for a library part 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_LibPart::ownUnID&lt;E&gt;&lt;/E&gt;.  You will find functions like &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIAny_CheckLibPartSubtypeOfbyMainID&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;APIAny_CheckLibPartSubtypeOfID&lt;E&gt;&lt;/E&gt; to be useful.</description>
      <pubDate>Wed, 24 Feb 2016 10:38:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-Type-ID-and-Variation-ID-from-API-LibPart/m-p/258641#M4995</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2016-02-24T10:38:52Z</dc:date>
    </item>
  </channel>
</rss>

