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

Delaying loop

Anonymous
Not applicable
Hello,
Im working on an add-on which runs a foor loop that finally run an external programm (autohotkey script).
My problem is that the actions the external program does take some time (2-3 seconds), and in the meanwhile the loop continues, what makes my add-on to get mad (!).
I tried to put a Sleep() function between each iteration, but this function delayed the whole Archicad Process (archicad stopped working).
Is there anyway Inside the API to delay the add-on only? like Sleep()?

THANKS!
4 REPLIES 4
Ralph Wessel
Mentor
zanzibar wrote:
Is there anyway Inside the API to delay the add-on only? like Sleep()?
Unfortunately, no. Add-ons don't run on a separate thread, so ArchiCAD will always wait for the add-on to return before continuing.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Well that's a bomber. Do you have any suggestion for me?
Anonymous
Not applicable
I forgot tho mention how important this project is to me.
I'll try to explain you what I'm trying to do: I'm trying to automate the process of exporting each floor to 3ds format. in the last thread I asked about that.

please give me a piece of advice I'm starring to loose hope.
Anonymous
Not applicable
anything?