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

ACAPI_ProcessWindow_IsProcessCanceled from AC27 C++ API

S_ISHIKAWA
Participant

I want to detect the cancellation of a process window.
Even if I use the function ACAPI_ProcessWindow_IsProcessCanceled, it keeps returning 0 even if I click to cancel, and I am not able to detect the cancellation.

 

This function has been changed from AC27 in the function name and other calling methods, but are there any conditions for this function to detect process window cancellations?
Or is there another way?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
LChen
Graphisoft
Graphisoft

Hi, There are some sample code in API Examples which using ACAPI_ProcessWindow_IsProcessCanceled(), like ModelAccess_Test_Exportor.cpp, could you try whether it works on your pc?

HTH.

View solution in original post

Solution

Thank you very much.
I tried several patterns and the only time I could not cancel was when I was calling another add-on function, such as when I was doing DXF output.
In that case, when I clicked in the process window, I found that “ACAPI_AddOnAddOnCommunication_Call” which calls the add-on returned a cancellation instead of ACAPI_ProcessWindow_IsProcessCanceled I was able to solve the problem.

View solution in original post

2 REPLIES 2
Solution
LChen
Graphisoft
Graphisoft

Hi, There are some sample code in API Examples which using ACAPI_ProcessWindow_IsProcessCanceled(), like ModelAccess_Test_Exportor.cpp, could you try whether it works on your pc?

HTH.

Solution

Thank you very much.
I tried several patterns and the only time I could not cancel was when I was calling another add-on function, such as when I was doing DXF output.
In that case, when I clicked in the process window, I found that “ACAPI_AddOnAddOnCommunication_Call” which calls the add-on returned a cancellation instead of ACAPI_ProcessWindow_IsProcessCanceled I was able to solve the problem.