<?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 menu icon in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220177#M8170</link>
    <description>I can't get it working.&lt;BR /&gt;
No icon pictures show in my menu.&lt;BR /&gt;
&lt;BR /&gt;
But the image is compiled correctly because in the RO directory appears a buttonVekaCreate&amp;amp;96.ico file.&lt;BR /&gt;
&lt;BR /&gt;
This is my code:&lt;BR /&gt;
------------------------------------
&lt;PRE&gt;in RegisterInterface (void):

err = ACAPI_Register_Menu(ID_MENU_STRINGS1, ID_STATUS_STRINGS1, MenuCode_UserDef, MenuFlag_Default);&lt;/PRE&gt;

------------------------------------
&lt;PRE&gt;in file .grc:

'STR#' ID_MENU_STRINGS1 "Menu strings" {
/* [  1] */		"WinDoPlan"
/* [  2] */		"Neues Fenster oder Tür^33000"
}
--------------------------------------
in file ...fix.grc:

'GICN' 33000 "buttonVekaCreate icon" {
    "buttonVekaCreate"
}&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Feb 2020 18:57:07 GMT</pubDate>
    <dc:creator>Martin Walter</dc:creator>
    <dc:date>2020-02-17T18:57:07Z</dc:date>
    <item>
      <title>Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220175#M8168</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I would like to add an icon to my menu entries:&lt;BR /&gt;How can I do this?&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Sep 2024 07:45:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220175#M8168</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2024-09-24T07:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220176#M8169</link>
      <description>Add the icon resource ID in the menu item resource like this:&lt;PRE&gt;"Help^32529"&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 Feb 2020 22:18:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220176#M8169</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-16T22:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220177#M8170</link>
      <description>I can't get it working.&lt;BR /&gt;
No icon pictures show in my menu.&lt;BR /&gt;
&lt;BR /&gt;
But the image is compiled correctly because in the RO directory appears a buttonVekaCreate&amp;amp;96.ico file.&lt;BR /&gt;
&lt;BR /&gt;
This is my code:&lt;BR /&gt;
------------------------------------
&lt;PRE&gt;in RegisterInterface (void):

err = ACAPI_Register_Menu(ID_MENU_STRINGS1, ID_STATUS_STRINGS1, MenuCode_UserDef, MenuFlag_Default);&lt;/PRE&gt;

------------------------------------
&lt;PRE&gt;in file .grc:

'STR#' ID_MENU_STRINGS1 "Menu strings" {
/* [  1] */		"WinDoPlan"
/* [  2] */		"Neues Fenster oder Tür^33000"
}
--------------------------------------
in file ...fix.grc:

'GICN' 33000 "buttonVekaCreate icon" {
    "buttonVekaCreate"
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Feb 2020 18:57:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220177#M8170</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-17T18:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220178#M8171</link>
      <description>How about the format and naming of your source images?</description>
      <pubDate>Mon, 17 Feb 2020 22:15:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220178#M8171</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-17T22:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220179#M8172</link>
      <description>I'm working on windows and saved the images into the folder ..\RFIX\Images\&lt;BR /&gt;
as .png&lt;BR /&gt;
e.g. buttonVekaCreate.png&lt;BR /&gt;
&lt;BR /&gt;
and my command for compiling the resources is taken from the examples:&lt;BR /&gt;

&lt;PRE&gt;..\APIDevelopmentKit23\Tools\Win\ResConv.exe" -m r -D WINDOWS -T W -q utf8 1252 -i "RINT\$(ProjectName).grc" -D _DEBUG -o "$(OutDir)\RO\$(ProjectName).grc.rc2&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 12:21:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220179#M8172</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-18T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220180#M8173</link>
      <description>Are you able to confirm that the resources and images are correctly embedded in the built add-on?</description>
      <pubDate>Tue, 18 Feb 2020 12:53:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220180#M8173</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-18T12:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220181#M8174</link>
      <description>the file ArchicadPluginFix.grc.rc2 in the RO folder looks like this:&lt;BR /&gt;
&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;//nclude "DGDefs.h"

/*---- This file was created by GRC compiler --------------------------------------------*/
/*                                                                                       */
/*     Source file: RFIX\ArchicadPluginFix.grc              Code table: NUL              */
/*                                                                                       */
/*---- Version 2.0 - Windows ------------------------------ (c) 1996-2019 by GRAPHISOFT -*/


#include "MDIDs_APICD.h"

32500 MDID
BEGIN
	8, 0,
	0L + 707017037,
	0L + 4022811608
END

I33000&amp;amp;96	ICON "buttonVekaCreate&amp;amp;96.ico"

I33001&amp;amp;96	ICON "buttonVekaChange&amp;amp;96.ico"

I33002&amp;amp;96	ICON "buttonVekaSettings&amp;amp;96.ico"
&lt;/PRE&gt;
-------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
so the icons are created&lt;BR /&gt;
and I find the files in the RO folder:&lt;BR /&gt;
buttonVekaChange&amp;amp;96.ico&lt;BR /&gt;
buttonVekaCreate&amp;amp;96.ico&lt;BR /&gt;
buttonVekaSettings&amp;amp;96.ico&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
what else can I check?</description>
      <pubDate>Tue, 18 Feb 2020 14:29:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220181#M8174</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-18T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220182#M8175</link>
      <description>Obviously this is a BUG in Archicad API.&lt;BR /&gt;
For the second level menu items the icons are working.&lt;BR /&gt;
But not for the first level:&lt;BR /&gt;



&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'STR#' DGTEST_MENU_STRINGSID "Menu strings" {
/* [   ] */		"Test"
/* [   ] */		"DG Functions^10000"
/* [  1] */			"Fill Settings^EL^10000"
/* [  2] */			"Library Browser^EL^10080"
&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Feb 2020 19:53:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220182#M8175</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-21T19:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220183#M8176</link>
      <description>I am also facing the same issue - not able to get the icon at that level. And looking at ArchiCAD's default menus, icons are visible at that level. So it seems it should be possible..</description>
      <pubDate>Fri, 06 Mar 2020 11:59:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220183#M8176</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2020-03-06T11:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220184#M8177</link>
      <description>I don't think the API allows you to set the icon for the parent item of a sub-menu</description>
      <pubDate>Fri, 06 Mar 2020 12:33:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220184#M8177</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-03-06T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220185#M8178</link>
      <description>I finally solved the problem for me.&lt;BR /&gt;
The indexes are the problem. It is not working this way:&lt;BR /&gt;

&lt;PRE&gt;'STR#' ID_MENU_STRINGS_NEW "Menu strings" {
/* [    ] */		"Planersoftware 2.0"
/* [  1] */		"Erstelle neues Fenster oder Tür^32101"
}&lt;/PRE&gt;

But this way:&lt;BR /&gt;

&lt;PRE&gt;'STR#' ID_MENU_STRINGS_NEW "Menu strings" {
/* [  1] */		"Planersoftware 2.0"
/* [  2] */		"Erstelle neues Fenster oder Tür^32101"
}&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Mar 2020 13:41:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220185#M8178</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-03-07T13:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220186#M8179</link>
      <description>Hi Martin,&lt;BR /&gt;
I just tried indexing your way (starting from 1 for the main menu), but I'm still not getting the menu-icon.&lt;BR /&gt;
&lt;BR /&gt;
Dushyant Basson</description>
      <pubDate>Mon, 09 Mar 2020 09:06:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220186#M8179</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2020-03-09T09:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220187#M8180</link>
      <description>Here is a working example for the first menu level.</description>
      <pubDate>Thu, 12 Mar 2020 13:29:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220187#M8180</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-03-12T13:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220188#M8181</link>
      <description>In your attached example,&lt;BR /&gt;
DG_Test.grc has: &lt;B&gt;"DG Functions^10000"&lt;/B&gt;&lt;BR /&gt;
But DG_TestFix.grc has no identifier with 10000.</description>
      <pubDate>Fri, 13 Mar 2020 06:22:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220188#M8181</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2020-03-13T06:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220189#M8182</link>
      <description>&lt;BLOCKQUOTE&gt;Martin wrote:&lt;BR /&gt;
The indexes are the problem. It is not working this way:&lt;BR /&gt;
'STR#' ID_MENU_STRINGS_NEW "Menu strings" {&lt;BR /&gt;
/* [    ] */		"Planersoftware 2.0"&lt;BR /&gt;
/* [  1] */		"Erstelle neues Fenster oder Tür^32101"&lt;BR /&gt;
}&lt;/BLOCKQUOTE&gt;
Those aren't indices – they're just comments. The compiler ignores them, so they could contain nothing or not be there at all. We put them in as an easy visual check when referencing the menu items in code, i.e. ensuring the code aligns to the resources.</description>
      <pubDate>Fri, 13 Mar 2020 08:33:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220189#M8182</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-03-13T08:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220190#M8183</link>
      <description>What guides the indenting of sub-menus? How to control which sub-menu can further have its own sub-menus?</description>
      <pubDate>Fri, 13 Mar 2020 14:22:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220190#M8183</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2020-03-13T14:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220191#M8184</link>
      <description>If you're adding a custom menu, the number of items in the resource determines if it's a single menu item of a submenu. If there's only 2 items, the first is the main menu and the second is the menu item. If more than 2, the first is them main menu, the second is the submenu and any additional items are listed under the submenu. You can't nest menus any deeper than that.&lt;BR /&gt;
For example:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'STR#' 32510  "Nested Menu" {
	"Main Menu"
	"Submenu"
	"Item 1"
	"Item 2"
	"Item 3"
}


'STR#' 32511  "Single Item" {
	"Main Menu"
	"Item 1"
}
&lt;/PRE&gt;
The single menu item and submenu above will both appear under the menu "Main Menu".</description>
      <pubDate>Fri, 13 Mar 2020 14:35:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220191#M8184</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-03-13T14:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Add menu icon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220192#M8185</link>
      <description>We have our company standards available in our 'JHP' drop down menu and are able to get an icon at the parent level.  One thing we have discovered is that the integer used as the reference for the menu item is of type short with a max value of 32767.  Your original example, that did not work, uses 33000.  The subsequent examples that do work use 32501, 32101, 10000, etc. - - all less than 32767.&lt;BR /&gt;
&lt;BR /&gt;
Just a guess...</description>
      <pubDate>Tue, 22 Jun 2021 22:46:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Add-menu-icon/m-p/220192#M8185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-22T22:46:06Z</dc:date>
    </item>
  </channel>
</rss>

