<?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: Add-On Template in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248842#M4306</link>
    <description>&lt;BLOCKQUOTE&gt;Hai wrote:&lt;BR /&gt;
Thank you so much but I'm a beginner and sorry I don't understand where menu handler is.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;
Search the project for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;MenuCommandHandler&lt;E&gt;&lt;/E&gt;. For that particular project, it's in the file &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;AddOnObject_Manager.cpp&lt;E&gt;&lt;/E&gt;</description>
    <pubDate>Thu, 04 Oct 2018 16:17:36 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2018-10-04T16:17:36Z</dc:date>
    <item>
      <title>Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248837#M4301</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;The Xcode Add On Template is great to get started but lacks the menu 'hook-up' necessary to start a project. This kind of defeats the propose of a quick start template.&lt;BR /&gt;&lt;BR /&gt;Would like to see a template that includes a simple test menu with say one item/function and the standard 'Hello World' WriteReport message.&lt;BR /&gt;&lt;BR /&gt;Are there any instruction available as how to create my own template in xcode to do this?&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Oct 2022 11:05:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248837#M4301</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2022-10-06T11:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248838#M4302</link>
      <description>It would be good to have one for Visual Studio as well. So you can start project instantly on custom path.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 03 Oct 2018 14:08:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248838#M4302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-03T14:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248839#M4303</link>
      <description>&lt;BLOCKQUOTE&gt;kzaremba wrote:&lt;BR /&gt;
It would be good to have one for Visual Studio as well. So you can start project instantly on custom path.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;

I'm using VS 2017 but I don't know how to start with Hello World Blog. How can I use that code and necessary resource to get Hello World in AC. Could you show me how to do it step by step? Thanks for your kind.</description>
      <pubDate>Thu, 04 Oct 2018 01:59:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248839#M4303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-04T01:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248840#M4304</link>
      <description>I suggest copying one of the example projects with a single menu item, e.g. AddOnObject_Manager and replace the code in the menu handler:
&lt;PRE&gt;// -----------------------------------------------------------------------------
// DoCommand
//		called to perform the user-asked command
// -----------------------------------------------------------------------------

GSErrCode	__ACENV_CALL	MenuCommandHandler (const API_MenuParams *params)
{
	if (params-&amp;gt;menuItemRef.itemIndex == 1) {
		//Your code here
	}

	return NoError;
}		// MenuCommandHandler
&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Oct 2018 08:34:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248840#M4304</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-10-04T08:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248841#M4305</link>
      <description>Hi Ralph,&lt;BR /&gt;
Thank you so much but I'm a beginner and sorry I don't understand where menu handler is.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;</description>
      <pubDate>Thu, 04 Oct 2018 14:49:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248841#M4305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-04T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248842#M4306</link>
      <description>&lt;BLOCKQUOTE&gt;Hai wrote:&lt;BR /&gt;
Thank you so much but I'm a beginner and sorry I don't understand where menu handler is.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;
Search the project for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;MenuCommandHandler&lt;E&gt;&lt;/E&gt;. For that particular project, it's in the file &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;AddOnObject_Manager.cpp&lt;E&gt;&lt;/E&gt;</description>
      <pubDate>Thu, 04 Oct 2018 16:17:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248842#M4306</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2018-10-04T16:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248843#M4307</link>
      <description>&lt;BLOCKQUOTE&gt;Hai wrote:&lt;BR /&gt;
Hi Ralph,&lt;BR /&gt;
Thank you so much but I'm a beginner and sorry I don't understand where menu handler is.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;

So, in your RegisterInterface() function:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GSErrCode	__ACENV_CALL	RegisterInterface (void)
{
	ACAPI_Register_Menu (32500, 0, MenuCode_UserDef, MenuFlag_Default);

	return NoError;
}		// RegisterInterface
&lt;/PRE&gt;

Here 32500 is the ID of the string resource that appears in the menu; add this to the .grc file:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'STR#' 32500 "Strings for the Menu" {
/* [  1] */  "Hello world"
}
&lt;/PRE&gt;

Then in your Initialize() function add the following:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GSErrCode __ACENV_CALL	Initialize (void)
{
    GSErrCode err = ACAPI_Install_MenuHandler (32500, MenuCommandHandler);
    // other stuff
}
&lt;/PRE&gt;

Last, in your MenuCommandHandler function call Do_CreateHelloWord():
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GSErrCode	__ACENV_CALL	MenuCommandHandler (const API_MenuParams *params)
{
    if (params-&amp;gt;menuItemRef.itemIndex == 1) {
        Do_CreateHelloWord ();
    }
}
&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 11:23:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248843#M4307</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2018-10-05T11:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248844#M4308</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;
Search the project for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;MenuCommandHandler&lt;E&gt;&lt;/E&gt;. For that particular project, it's in the file &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;AddOnObject_Manager.cpp&lt;E&gt;&lt;/E&gt;
&lt;/BLOCKQUOTE&gt;
Thank you very much. I will learn it and reply for result as soon.</description>
      <pubDate>Fri, 05 Oct 2018 17:27:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248844#M4308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-05T17:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Template</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248845#M4309</link>
      <description>Hi Akos, &lt;BR /&gt;
Thank you very much for the detailed guide for me. It's very helpful for the beginner like me.&lt;BR /&gt;
&lt;BR /&gt;
P/S: Thanks for Ralph, I can build more example without any errors and maybe I knew how API work and folder structure. Thank so much for supporting. I will do something by myself ^.^</description>
      <pubDate>Fri, 05 Oct 2018 17:32:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-On-Template/m-p/248845#M4309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-05T17:32:01Z</dc:date>
    </item>
  </channel>
</rss>

