1
Python and Java API / Timed interrupt of a loop.
« on: August 26, 2019, 03:04:31 PM »
Hi,
I made an automated script for agisoft Metashape 1.5.0
This script potentially loops indefinitely and I thought it would be nice to give the user the potential to exit the loop after each loop.
The idea was to Metashape.getBool in order to give the user a chance to input a boolean.
IF the user were to not input anything for say, 10 seconds, it would default to False and continue the loop.
However, you cannot do anything while the script is sleeping, and asking for a boolean also halts the process, so I cannot get any temporary pop-up going.
I've tried with multi-threading but it either doesn't work with Agisoft or I am doing something wrong.
I am using windows 10, python 3.6 (I believe).
Thanks for any help,
Stijn Klessens
I made an automated script for agisoft Metashape 1.5.0
This script potentially loops indefinitely and I thought it would be nice to give the user the potential to exit the loop after each loop.
The idea was to Metashape.getBool in order to give the user a chance to input a boolean.
IF the user were to not input anything for say, 10 seconds, it would default to False and continue the loop.
However, you cannot do anything while the script is sleeping, and asking for a boolean also halts the process, so I cannot get any temporary pop-up going.
I've tried with multi-threading but it either doesn't work with Agisoft or I am doing something wrong.
I am using windows 10, python 3.6 (I believe).
Thanks for any help,
Stijn Klessens