DIAdem Help

Method: MarkDataAsInvalid for ContextVnV <Data Preprocessor>

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

Method: MarkDataAsInvalid for ContextVnV <Data Preprocessor>

Marks the data to be processed as invalid.

Object.MarkDataAsInvalid(reason)
ObjectContextVnV <Data Preprocessor>
Object with this method
reasonString
Contains the information why the data is invalid.

The following example checks whether a channel exists, and marks the file as valid or invalid. If the file is valid, the example executes further analyses.

VBScriptPython

 

Sub On_ValidationAndVerification(oContext)
  If (Data.Root.ActiveChannelGroup.Channels(1).Name = "Time") Then
      Call oContext.MarkDataAsValid()
  Else
      Call oContext.MarkDataAsInvalid("Time channel does not exist")
  End If 
  If oContext.IsDataValid Then
    ' do something
  End If
End Sub