<?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: Can addon behave like the normal buiding elements tools ? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357710#M1167</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;Are you using an `IconButton`?&lt;BR /&gt;I think the behavior you want should work with an `IconPushCheck`.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Oct 2022 08:37:46 GMT</pubDate>
    <dc:creator>BerndSchwarzenbacher</dc:creator>
    <dc:date>2022-10-01T08:37:46Z</dc:date>
    <item>
      <title>Can addon behave like the normal buiding elements tools ?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357581#M1166</link>
      <description>&lt;P&gt;When using&amp;nbsp; walls, colums etc in AC&amp;nbsp; the tool stays active after you finish your input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to get this behaviour for an addon?&lt;/P&gt;&lt;P&gt;I have a palette with an icon that let me place a text element, but i have to reclick the icon for each new text element.&lt;/P&gt;&lt;P&gt;Is there a way to make this comand 'sticky' so i can reuse it multiple time ?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 06:33:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357581#M1166</guid>
      <dc:creator>julienK</dc:creator>
      <dc:date>2022-09-30T06:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can addon behave like the normal buiding elements tools ?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357710#M1167</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;Are you using an `IconButton`?&lt;BR /&gt;I think the behavior you want should work with an `IconPushCheck`.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 08:37:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357710#M1167</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2022-10-01T08:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can addon behave like the normal buiding elements tools ?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357805#M1168</link>
      <description>&lt;P&gt;I do use an iconButton on my palette, yes.&lt;/P&gt;&lt;P&gt;The issue is not to retain some parameter that works just fine, the issue is that I want the command linked to that button to stay active once the first iteration is finished.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the palette I have&amp;nbsp; a buttonclicked event observer, what I want it the function lnked to the button to be called again once it completes.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 05:27:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357805#M1168</guid>
      <dc:creator>julienK</dc:creator>
      <dc:date>2022-10-03T05:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can addon behave like the normal buiding elements tools ?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357851#M1169</link>
      <description>&lt;P&gt;Thanks for the clarification. I misunderstood your question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand it correctly now, I think you would have to manage that manually by e.g. having a loop in your ButtonClicked event observer and stop the loop once the user cancels the input. For example the function APIIo_GetPointID returns APIERR_CANCEL when users cancel the input.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does this address your issue? Otherwise could you provide the code of your ButtonClicked event observer?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 11:57:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357851#M1169</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2022-10-03T11:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can addon behave like the normal buiding elements tools ?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357855#M1170</link>
      <description>&lt;P&gt;Sorry I forgot to come back to say I found the solution.&lt;/P&gt;&lt;P&gt;Like you suggested&amp;nbsp; i changed my function return type to GSErrCode and wrapped it in&amp;nbsp; a do-while loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;	 GSErrCode Do_iterate() {
		 GSErrCode err;
		 do {
			 ACAPI_CallUndoableCommand("Iterated element",
				 [&amp;amp;]() -&amp;gt; GSErrCode {
					 err = Do_CreateText();
					 return NoError;
				 });
		 } while (err == NoError);
		 return err;
	 }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my Do_CreateText function calls ClickAPoint() from APICommon.c whick does return&amp;nbsp; APIERR_Cancel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 12:38:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-addon-behave-like-the-normal-buiding-elements-tools/m-p/357855#M1170</guid>
      <dc:creator>julienK</dc:creator>
      <dc:date>2022-10-03T12:38:52Z</dc:date>
    </item>
  </channel>
</rss>

