Measurement Computing DaqView User Manual
Page 86

vxl-12 ViewXL
987691
Software Reference
Public Function vxlIsAcquiring() As Boolean
This function returns True if the Server is Armed and acquiring data.
Public Function vxlGetAcqFiles(ByRef sArray() As String) As Boolean
This function gets the names of the files that have been acquired by the Server. If the Function returns
True, there are files that have been acquired. The sArray argument is an undimensioned string array. On
return, the array will be dimensioned and filled with the names of the acquired data files. Note. If the
option to delete data files after reading them into Excel is checked, the file names returned by this
function call may have already been deleted. The function can be used as follows:
Dim i As Integer
Dim sArray() As String
If (VIEWXL.Interface.vxlGetAcqFiles(sArray) Then
For i = LBound(sArrray) To UBound(sArray)
' Process Files
sArray(i)
Next
EndIf
Public Function vxlIsServerRunning() As Boolean
This function returns True if the Server is currently running.
Public Sub vxlUpdateViewXL()
This method synchronizes the ViewXL Menus and Toolbar with the current state of the Server.
This is not normally needed if an acquisition has been started from the ViewXL interface.
However, if an acquisition has been started from the Server application, this call can be used to
update the ViewXL interface. The following example demonstrates the use of this, and other
API functions.
' Check if the Server is running
If (Not VIEWXL.Interface.IsServerRunning()) Then
Beep
' ask to start server if not running
If (MsgBox("The server is not running. Do you want to start it?", _
vbQuestion + vbYesNo) <> vbYes) Then
Exit Sub
End If
VIEWXL.Interface.vxlConfig
End If
' update current server status
VIEWXL.Interface.vxlUpdateViewXL
' if the server is acquiring, stop it
If (VIEWXL.Interface.vxlIsAcquiring) Then
' halt the acquisition in progress
VIEWXL.Interface.vxlDisArmServer
End If
' Continue with Excel VBA program