WaitDialogPoll

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > UserInterface >

WaitDialogPoll

Description

Updates the progress bar of the wait dialog with the value given in percent

Syntax

call DBWShell("WaitDialogPoll Percent")

Parameters

Percent

an integer included in the [0..100] interval

Results

@CANCEL

If 1 means that the user has pressed the CANCEL button in the wait dialog

See also

WaitDialogClose
WaitDialogSetMessage
WaitDialogOpen
WaitDialogPoll

Example

...

'get the totalCount number of records to read
...
actionCanceled = false
recCount = 0
 DBWShell("WaitDialogOpen " & replace("Local Checkout Mode Database Synchronization"," ","|") & " " & replace("Synchronization in progress ..."," ","|") )
 While recset.EOF = false and actionCanceled = false
  ... = recset.Fields(0).Value
  ... = recset.Fields(1).Value
  ...
  DBWShell("WaitDialogPoll " & Clng((recCount*100)/totalCount) )
  actionCanceled = DBWResult("@CANCELED")
  DBWShell("WaitDialogSetMessage " & replace("Reading record #" & recCount," ","|"))
  recCount = recCount+1
  recSet.MoveNext
 Wend
 DBWShell("WaitDialogClose")
...
...