cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is there a way to change the menu text while running?

Hi.

I am trying to write a plugin which can update itself. Since there is no way to unload the apx while running, I make the apx to be a "shell" which can dynamic load dll. The dll ontains the implementation. However, I have no idea about RegisterInterface function because the function ACAPI_Register_Menu seems to have something to do with the runtime environment (maybe the stack or registers). I don't want to fix the menu in the "shell" but dynamicly load the related information from dll or txt. So I was wondering if I could change the menu text when ARCHICAD is running? Is there an API like ACAPI_Register_Menu?

Thanks in advance.
1 Reply 1
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

Yes, you can use ACAPI_Interface (APIIo_SetMenuItemTextID, ...) function for this purpose.
API_MenuItemRef  menuItemRef;
GS::UniString    menuItemStr = "New Text for Menu!!!";

BNZeroMemory (&menuItemRef, sizeof (API_MenuItemRef));
menuItemRef.menuResID = 32500;
menuItemRef.itemIndex = 1;
ACAPI_Interface (APIIo_SetMenuItemTextID, &menuItemRef, nullptr, menuItemStr);
Note, you have to register your menu with ACAPI_Register_Menu in your RegisterInterface function and after that you can change the text of the menu anytime.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!