DIAdem Help

Method: Exists for UpdateData <Navigator>

  • Updated2024-09-12
  • 1 minute(s) read

Method: Exists for UpdateData <Navigator>

Checks whether a DataPlugin with a specified name is in the update source.

bExists = Object.Exists(Name)
ObjectUpdateData <Navigator>
Object with this method
NameString
Specifies the name of the DataPlugin.
bExistsBoolean
Specifies whether the DataPlugin with the specified name already exists (TRUE) or not (FALSE).

The following example checks whether the GPX DataPlugin is in the update source and updates this DataPlugin if a more current VBS DataPlugin version is available.

VBScriptPython

 

Dim oMyDataUpdateSource, oMyUpdateData, oPluginData
Set oMyDataUpdateSource = Navigator.Settings.CreateUpdateSource()
Set oMyUpdateData = oMyDataUpdateSource.UpdateData
If oMyUpdateData.Exists("GPX") Then
  Set oPluginData = oMyUpdateData("GPX")
  If ((oPluginData.Type = ePluginCodeVbCrypt) OR (oPluginData.Type = ePluginCodeVbs)) Then
    Call oMyDataUpdateSource.Install("GPX", TRUE)
  Else
    Call MsgBoxDisp("DataPlugin " & oPluginData.Name & " is no VBCrypt or VBS DataPlugin." & vbcrlf _
    & "Please install the DataPlugin manually from the NI website.")
  End If 
End If