How To: Update the display while Avenue script is running


How can the display be updated while an Avenue script is running?


Avenue queues display requests and does not process them until there is a break in the script or until directed to.

Use the Flush request inside the script in order to update the display with all waiting drawing events. An example of how flush may be used follows:

'--- Reference the view object
theView = av.GetProject.FindDoc("View1")

'--- Add a draw event request to the draw event queue

'--- Force the draw event queue to be processed before the next Avenue request


Avenue maintains drawing requests in a queue until all scripts finish. This is necessary as some drawing requests may take several seconds and would slow script operations tremendously, if allowed to execute while a script is running.