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

Call the C++ API continuously every x minutes

BenjiDev
Enthusiast

I'm looking for some way to use the C++ API (like opening a dialog or creating a wall element) on a timer basis.

Something along the lines of when the addon is loaded register a callback (lambda/function pointer)  that runs some functionality every minute.

 

Otherwise I'm thinking of spawning a thread in RegisterInterface that wakes up every minute and does what i want. But I don't think the C++ API likes being used from a separate thread... 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
BenjiDev
Enthusiast

I stumbled across the GS::MessageLoopExectuor class, looks like it can be useful to run heavy tasks without freezing up the UI. It also has some "Wait" methods that looks like something i can use. 

View solution in original post

1 REPLY 1
Solution
BenjiDev
Enthusiast

I stumbled across the GS::MessageLoopExectuor class, looks like it can be useful to run heavy tasks without freezing up the UI. It also has some "Wait" methods that looks like something i can use. 

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!