How To > Use DotNet > Call a MAXScript Function Periodically |
The following tutorials demonstrate the use of the System.Windows.Forms.Timer dotNetObject as alternative to the MAXScript Timer UI Control. Other than the latter, the DotNet object version does not require a MAXScript User Interface to be created and opened to run a MAXScript function at given time intervals.
dotNetObject:System.Windows.Forms.Timer
NATURAL LANGUAGE |
Create a DotNet Timer Object. |
Define a MAXScript function to be called periodically by the timer. |
Register an Event Handler to call the function |
Start the Timer. |
Define a MAXScript function to be called by the Timer.
Add ON TICK event handler to call the function.
Set the tick interval to 1 second (1000 milliseconds).
Remove the remark and call this method to stop the Timer.