<?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 Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263065#M2070</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello everybody. I have a problem. My plugin/plugin button is disabled in South Elevation / 3D All / Action Center views, but everything works fine in the ground floor view. Tell me why this is happening?? Thx&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:39:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-14T07:39:03Z</dc:date>
    <item>
      <title>Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263065#M2070</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello everybody. I have a problem. My plugin/plugin button is disabled in South Elevation / 3D All / Action Center views, but everything works fine in the ground floor view. Tell me why this is happening?? Thx&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:39:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263065#M2070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T07:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263066#M2071</link>
      <description>You can specify in the grc file where your command will be available. The magically looking tokens (E3, ES, etc.) are for this purpose.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'STR#' ID_ADDON_MENU "Strings for the Menu" {
/* [  1] */		"Example AddOn Command... ^E3 ^ES ^EE ^EI ^ED ^ET ^10001"
}
&lt;/PRE&gt;

You can check the complete list here:&lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/APIDevKit51/APIHTMLLibrary/Level2/Required_Resources.html" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/tech ... urces.html"&gt;http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/APIDevKit51/APIHTMLLibrary/Level2/Required_Resources.html&lt;/LINK_TEXT&gt;&lt;/A&gt;</description>
      <pubDate>Thu, 29 Apr 2021 12:49:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263066#M2071</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-04-29T12:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263067#M2072</link>
      <description>&lt;BLOCKQUOTE&gt;Viktor wrote:&lt;BR /&gt;
You can specify in the grc file where your command will be available. The magically looking tokens (E3, ES, etc.) are for this purpose.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'STR#' ID_ADDON_MENU "Strings for the Menu" {
/* [  1] */		"Example AddOn Command... ^E3 ^ES ^EE ^EI ^ED ^ET ^10001"
}
&lt;/PRE&gt;

You can check the complete list here:&lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/APIDevKit51/APIHTMLLibrary/Level2/Required_Resources.html" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/tech ... urces.html"&gt;http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/APIDevKit51/APIHTMLLibrary/Level2/Required_Resources.html&lt;/LINK_TEXT&gt;&lt;/A&gt;
&lt;/BLOCKQUOTE&gt;

Thanks a lot, it really works. But now I have a new question.&lt;BR /&gt;
In my plugin I get doors :
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GS::Array&amp;lt;API_Guid&amp;gt; elementList;
 ACAPI_Element_GetElemList(API_DoorID, &amp;amp;elementList, APIFilt_OnVisLayer);
&lt;/PRE&gt;
In resources, I used "^ES^EE^EI^ED^EW^E3^EL" and  I can call my plugin.  In 3D window view or Ground Floor  I successfully getting the data list, but in Elevations my doors list is empty. &lt;BR /&gt;
&lt;BR /&gt;
How can I get data in Elevations windows or other(Worksheets/Welcome ...)? Can I somehow get a document and get all the information I need from it, for example, a door?</description>
      <pubDate>Thu, 29 Apr 2021 16:06:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263067#M2072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-29T16:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263068#M2073</link>
      <description>Archicad API commands are context sensitive. It means that you can't access the same data from every window. This is why usually it's a good idea to make commands work over floor plan only (some of the internal commands work this way, too).&lt;BR /&gt;
&lt;BR /&gt;
When you are over a section window, you can access only the elements on that section. It is possible to switch to floor plan database, access the elements and switch back to the original database, but I don't recommend this workflow. If it's not a strong requirement to make it work over sections, it's a better choice to disable it.</description>
      <pubDate>Thu, 29 Apr 2021 17:44:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263068#M2073</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-04-29T17:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin\plugin button disabled in South Elevation/3D All/Action Center and other view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263069#M2074</link>
      <description>&lt;BLOCKQUOTE&gt;Konstantin wrote:&lt;BR /&gt;In my plugin I get doors :
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GS::Array&amp;lt;API_Guid&amp;gt; elementList;
 ACAPI_Element_GetElemList(API_DoorID, &amp;amp;elementList, APIFilt_OnVisLayer);
&lt;/PRE&gt;
In 3D window view or Ground Floor  I successfully getting the data list, but in Elevations my doors list is empty. &lt;BR /&gt;
&lt;BR /&gt;
How can I get data in Elevations windows or other(Worksheets/Welcome ...)? Can I somehow get a document and get all the information I need from it, for example, a door?&lt;/BLOCKQUOTE&gt;

In Section or Elevation windows there are no doors and windows, you can see only section elements instead (type is API_SectElemID). The parent of the section elements are the doors/windows/etc., see this code:&lt;BR /&gt;

&lt;PRE&gt;static GS::Array&amp;lt;API_Guid&amp;gt; GetElemListByTypeFromSectionElevation (API_ElemTypeID elemTypeId)
{
	GS::Array&amp;lt;API_Guid&amp;gt; result;

	GS::Array&amp;lt;API_Guid&amp;gt; sectElemList;
	ACAPI_Element_GetElemList (API_SectElemID, &amp;amp;sectElemList, APIFilt_OnVisLayer);

	for (const API_Guid&amp;amp; sectElemGuid : sectElemList) {
		API_Element elem = {};
		elem.header.guid = sectElemGuid;
		ACAPI_Element_Get (&amp;amp;elem);
		if (elem.sectElem.parentID == elemTypeId) {
			result.Push (elem.sectElem.parentGuid);
		}
	}

	return result;
}

// Usage

API_WindowInfo	currWindowInfo = {};
ACAPI_Database (APIDb_GetCurrentWindowID, &amp;amp;currWindowInfo);

static const GS::HashSet&amp;lt;API_WindowTypeID&amp;gt; sectElemOnlyWindows = {
	APIWind_SectionID,
	APIWind_ElevationID,
	APIWind_InteriorElevationID
};

GS::Array&amp;lt;API_Guid&amp;gt; elementList;
if (sectElemOnlyWindows.Contains (currWindowInfo.typeID)) {
	elementList = GetElemListByTypeFromSectionElevation (API_DoorID);
} else {
	ACAPI_Element_GetElemList (API_DoorID, &amp;amp;elementList, APIFilt_OnVisLayer);
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 May 2021 13:59:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Plugin-plugin-button-disabled-in-South-Elevation-3D-All-Action/m-p/263069#M2074</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2021-05-19T13:59:59Z</dc:date>
    </item>
  </channel>
</rss>

