We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-02-01 08:05 AM - last edited on 2024-09-17 11:28 AM by Doreena Deng
I have a simple process window that is working properly in Windows. But it is not even showing in MacOS.
Below is a simplified version of my code :
Int32 maxPercentageValue = 100;
GS::UniString title("Title");
GS::UniString subTitle("subTitle");
int renderPhaseCount = 10;
ACAPI_Interface(APIIo_InitProcessWindowID, &title, &renderPhaseCount);
ACAPI_Interface(APIIo_SetNextProcessPhaseID, &subTitle, &maxPercentageValue);
//Start rendering different sets of elements(walls, stairs, doors...) where each set
//corresponds to different phases of the process window
for(int i=0;i<totalElementsInCurrentSet;i++){
// Render one element from the set
...
//Update process window
Int32 percentage = (Int32) i*100/totalElementsInCurrentSet;
ACAPI_Interface(APIIo_SetProcessValueID, &percentage,NULL)
}
ACAPI_Interface(APIIo_SetNextProcessPhaseID, &subTitle, &maxPercentageValue);
// Do the same for the next set...
//Close process window after completion of rendering
ACAPI_Interface(APIIo_CloseProcessWindowID, NULL, NULL);
//Show render report( I don't know if this code affects the process window or not)
DGAlert(DG_INFORMATION, "Render report", "Done", "", "OK");
I tried the example Addons(Communication_Manager, DG_Test), the process window is showing properly for those in MacOS.
Any help is appreciated.
Thanks.
Solved! Go to Solution.
2024-02-04 02:12 PM
On mac you need to call APIIo_IsProcessCanceledID after APIIo_SetProcessValueID for the process window to appear. It is also recommended to handle the return value and stop the process if it returns true.
2024-02-04 02:12 PM
On mac you need to call APIIo_IsProcessCanceledID after APIIo_SetProcessValueID for the process window to appear. It is also recommended to handle the return value and stop the process if it returns true.
2024-02-05 12:20 PM
Thanks @Viktor Kovacs . That fixed the issue.
Also just wondering... Is there any way to control the behaviour of the process window on mouse-hover? I wanted to show a different text message than "Abort".
2024-02-05 07:45 PM
As far as I know you can't modify the abort text.