<?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 Using Do_SolidOperation_Create from Element_Test development kit. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Using-Do-SolidOperation-Create-from-Element-Test-development-kit/m-p/581194#M9024</link>
    <description>&lt;P&gt;Hi Team,&lt;BR /&gt;I was trying out to create a opening in a wall in ArchiCAD. From the ArchiCAD UI I can create polygonal shaped openings, but it was not supported via C++ library functions (yet to expose).&lt;BR /&gt;Checking other possibilities, I found a way to do using Solid Element Operations, where I merge a Morph (Operator) into Wall(Target) and do Subtract operation which will create an opening. This can be done in ArchiCAD UI.&lt;BR /&gt;Now trying to automate using C++ code, we have a function named&amp;nbsp;Do_SolidOperation_Create in Element_Test addon provided in development kit. Added the code below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;void Do_SolidOperation_Create (void)
{
	API_ElemTypeID		typeID;
	API_Guid			guid_Target, guid_Operator, guid_Operator2;
	GS::Array&amp;lt;API_Guid&amp;gt;	guid_Results;

	if (!ClickAnElem ("Click on a solid operation target", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Target)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	if (!ClickAnElem ("Click on a solid operator element", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Operator)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	if (!ClickAnElem ("Click on a solid operator element", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Operator2)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	GSErrCode err = ACAPI_Element_SolidOperation_Create (guid_Target, guid_Operator, APISolid_Substract, &amp;amp;guid_Results);
	if (err != NoError) {
		if (err == APIERR_NO3D)
			WriteReport_Alert ("Solid operation targets and operators can be freeshape elements only.");
		else
			WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
	} else {
		if (!guid_Results.IsEmpty ()) {
			err = ACAPI_Element_SolidOperation_Create (guid_Results[0], guid_Operator2, APISolid_Add);
			if (err != NoError) {
				if (err == APIERR_NO3D)
					WriteReport_Alert ("Solid operation targets and operators can be freeshape elements only.");
				else
					WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
			}
		}
	}

	return;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ArchiCAD provided function&amp;nbsp;ACAPI_Element_SolidOperation_Create only takes Morph object as target.&lt;BR /&gt;I want to know is there a way for us to pass a Wall ID to this function and create a opening in the target wall.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 12:40:44 GMT</pubDate>
    <dc:creator>roni</dc:creator>
    <dc:date>2024-09-16T12:40:44Z</dc:date>
    <item>
      <title>Using Do_SolidOperation_Create from Element_Test development kit.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Using-Do-SolidOperation-Create-from-Element-Test-development-kit/m-p/581194#M9024</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;I was trying out to create a opening in a wall in ArchiCAD. From the ArchiCAD UI I can create polygonal shaped openings, but it was not supported via C++ library functions (yet to expose).&lt;BR /&gt;Checking other possibilities, I found a way to do using Solid Element Operations, where I merge a Morph (Operator) into Wall(Target) and do Subtract operation which will create an opening. This can be done in ArchiCAD UI.&lt;BR /&gt;Now trying to automate using C++ code, we have a function named&amp;nbsp;Do_SolidOperation_Create in Element_Test addon provided in development kit. Added the code below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;void Do_SolidOperation_Create (void)
{
	API_ElemTypeID		typeID;
	API_Guid			guid_Target, guid_Operator, guid_Operator2;
	GS::Array&amp;lt;API_Guid&amp;gt;	guid_Results;

	if (!ClickAnElem ("Click on a solid operation target", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Target)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	if (!ClickAnElem ("Click on a solid operator element", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Operator)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	if (!ClickAnElem ("Click on a solid operator element", API_MorphID, nullptr, &amp;amp;typeID, &amp;amp;guid_Operator2)) {
		WriteReport_Alert ("No element was clicked.");
		return;
	}

	GSErrCode err = ACAPI_Element_SolidOperation_Create (guid_Target, guid_Operator, APISolid_Substract, &amp;amp;guid_Results);
	if (err != NoError) {
		if (err == APIERR_NO3D)
			WriteReport_Alert ("Solid operation targets and operators can be freeshape elements only.");
		else
			WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
	} else {
		if (!guid_Results.IsEmpty ()) {
			err = ACAPI_Element_SolidOperation_Create (guid_Results[0], guid_Operator2, APISolid_Add);
			if (err != NoError) {
				if (err == APIERR_NO3D)
					WriteReport_Alert ("Solid operation targets and operators can be freeshape elements only.");
				else
					WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
			}
		}
	}

	return;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ArchiCAD provided function&amp;nbsp;ACAPI_Element_SolidOperation_Create only takes Morph object as target.&lt;BR /&gt;I want to know is there a way for us to pass a Wall ID to this function and create a opening in the target wall.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:40:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Using-Do-SolidOperation-Create-from-Element-Test-development-kit/m-p/581194#M9024</guid>
      <dc:creator>roni</dc:creator>
      <dc:date>2024-09-16T12:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Do_SolidOperation_Create from Element_Test development kit.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Using-Do-SolidOperation-Create-from-Element-Test-development-kit/m-p/581195#M9025</link>
      <description>&lt;P&gt;This documentation shows&amp;nbsp;&lt;A href="https://graphisoft.github.io/archicad-api-devkit/group___element.html#ga1a5d9501241379e03fb90fd8137a5b5a" target="_blank"&gt;https://graphisoft.github.io/archicad-api-devkit/group___element.html#ga1a5d9501241379e03fb90fd8137a5b5a&lt;/A&gt;&lt;BR /&gt;the operation can be done only between two morph elements.&lt;BR /&gt;Is there any other way to do Solid Element Operation between Wall and Morph?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 12:00:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Using-Do-SolidOperation-Create-from-Element-Test-development-kit/m-p/581195#M9025</guid>
      <dc:creator>roni</dc:creator>
      <dc:date>2023-12-20T12:00:30Z</dc:date>
    </item>
  </channel>
</rss>

