WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   running an executable for a specific time period (https://forum.worldviz.com/showthread.php?t=1873)

Saz 03-02-2009 06:06 AM

running an executable for a specific time period
 
Hi there,
I've got an executable of my program that performs a number of different operations and eventually outputs data to a file. How would I go about inserting code into the program so that the file runs for 30 secs and then stops automatically. I can do it so that the data collection only lasts for 30 secs but would like something a little more elegant and automated

Thanks!

farshizzo 03-02-2009 09:26 AM

The following code will execute the viz.quit command after 30 seconds:
Code:

import vizact
vizact.ontimer(30,viz.quit)


Saz 03-03-2009 01:37 AM

Thank you - you're a star!


All times are GMT -7. The time now is 05:05 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC