Specifications
536 Chapter 18
COM Interface Reference
Application object
WaitForEvent method
Explanation Waits for the occurrence of a specified event for the specified period of time. This method
sends a response back.
VB syntax Application.WaitForEvent(EventName, MaxTime)
or
WaitForEvent(EventName, MaxTime)
Parameter EventName: To be selected from the following events.
MaxTime: Specifies maximum time to wait for occurrence of the event
Response Value of long integer type (1 or 0) is sent back.
Examples The following is an example of displaying a message when the trigger-waiting status does
not occur 10 seconds after confirming that the trigger system is in trigger waiting status.
Example 18-9 Example of using WaitForEvent method
Dim Bool As Long
Bool = Application.WaitForEvent(WaitForTrigger, 10)
If Bool = 0 Then
MsgBox "Time Out occured"
End If
SweepEnd Specifies the completion of sweep.
SweepStart Specifies the start of sweep.
CompleteSweepAveraging Specifies the completion of specified number of sweep
averaging.
WaitForTrigger Specifies the status of waiting for trigger
Value type Long integer type
Range 0 to 1E6
Unit s (seconds)
1 Specified event was received within specified time.
0 Specified event was not received within specified time
and it resulted in time-out.