We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Why does the Addon Menu Structure not rebuild? (Mac)

Anonymous
Not applicable
Hey everyone,

i set up the examples from the 21 API and everything works fine except for one thing. After the first build the addon doesn't register code changes to the menu string ressources in the grc when i rebuild. So the addon doesn't change its menu names in Archicad when i replace it with the new build. I tried making the changes before i build and drop it into Archicad addons and there it worked fine. So my guess was that Archicad stores some information somewhere and i found some hints on this forum but no complete solution. I tried:

-clean build in xcode
-clean build folder in xcode
-delete the cage folders of Archicad

None of this worked so far so i would greatly appreciate any hint that can help me solve this problem.

Thanks in advance!
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

An Add-On can register menus only from it's RegisterInterface function by using ACAPI_Register_Menu.
The RegisterInterface function of the Add-On will be called only once when ARCHICAD loads your Add-On during startup.
So if you rebuild your Add-On and copy it to the Add-Ons folder it's normal that the registered menu of your Add-On won't change. You have to restart ARCHICAD (or unload and reload your Add-On from the Add-On Manager dialog inside the Options main menu) to force reloading your Add-On.

View solution in original post

2 REPLIES 2
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

An Add-On can register menus only from it's RegisterInterface function by using ACAPI_Register_Menu.
The RegisterInterface function of the Add-On will be called only once when ARCHICAD loads your Add-On during startup.
So if you rebuild your Add-On and copy it to the Add-Ons folder it's normal that the registered menu of your Add-On won't change. You have to restart ARCHICAD (or unload and reload your Add-On from the Add-On Manager dialog inside the Options main menu) to force reloading your Add-On.
Anonymous
Not applicable
Tibor wrote:
Hi,

An Add-On can register menus only from it's RegisterInterface function by using ACAPI_Register_Menu.
The RegisterInterface function of the Add-On will be called only once when ARCHICAD loads your Add-On during startup.
So if you rebuild your Add-On and copy it to the Add-Ons folder it's normal that the registered menu of your Add-On won't change. You have to restart ARCHICAD (or unload and reload your Add-On from the Add-On Manager dialog inside the Options main menu) to force reloading your Add-On.
Thanks a lot Tibor! That helped. Seemes like i didn't try the obvious solutions in the end...