Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.
yesterday
I'm developing an add-on using the API in Archicad 27 with Visual C++ 2019 on Windows 10.
The add-on uses global variables to store calculated data in memory. When I run the add-on from the menu, the calculated results are stored in the add-on's memory. However, when I open the menu and run the add-on again, the previously stored values are lost.
How can I prevent this from happening?
Solved! Go to Solution.
yesterday
The default behaviour is for Archicad to unload an add-on from memory when it isn't in use, which will cause any data held by the add-on to be lost. You can prevent an add-on from being unloaded by calling ACAPI_KeepInMemory(true)
14 hours ago
I really appreciate your help!
GSErrCode Initialize (void){
//...
ACAPI_KeepInMemory(true);
return(err);
}
static GSErrCode MenuCommandHandler (const API_MenuParams *menuParams)
{
ACAPI_KeepInMemory(true);
//...
}
yesterday
The default behaviour is for Archicad to unload an add-on from memory when it isn't in use, which will cause any data held by the add-on to be lost. You can prevent an add-on from being unloaded by calling ACAPI_KeepInMemory(true)
14 hours ago
I really appreciate your help!
GSErrCode Initialize (void){
//...
ACAPI_KeepInMemory(true);
return(err);
}
static GSErrCode MenuCommandHandler (const API_MenuParams *menuParams)
{
ACAPI_KeepInMemory(true);
//...
}