DIAdem Help

Method: LogWarning for ContextInitialize <Analysis Automation>

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

Method: LogWarning for ContextInitialize <Analysis Automation>

Creates a warning. The analysis automation continues the script.

Object.LogWarning(message)
ObjectContextInitialize <Analysis Automation>
Object with this method
messageString
Specifies the warning text.

The following example outputs a warning when the parameter for the result path is missing:

VBScriptPython

 

Sub On_Initialize(oContext)
  Dim ResultsPath, oMyArguments
  Set oMyArguments = oContext.Procedure.Arguments
  If oMyArguments.Exists("ResultsPath") Then
    ResultsPath = oMyArguments.Item("ResultsPath").Value
    Call oContext.LogResult("Results path: " & ResultsPath)
  Else
    Call oContext.LogWarning("Results path missing")
  End If
End Sub