IsNodeSignEnabled Method Example
The following example creates the ESignature object, checks to see if the node is enabled for electronic signature, and determines if a specified tag (FIX32.thisnode.D01.F_CV) requires electronic signature. If required, the example validates the signature, writes the new value, and sends a message to the audit trail.
Dim ESig As Object
Dim bNodeSignEnabled As Boolean
Dim bSigRequired As Boolean
Dim bVerify As Boolean
Dim bContinuousUse As Boolean
Dim nInfo As Integer
Dim NewValue As Variant
'Create the ESignature object
Set ESig = CreateObject("ElectronicSignature.ESignatureFactory")
'Check if node is enabled for electronic signature
ESig.IsNodeSignEnabled bNodeSignEnabled
If bNodeSignEnabled = True Then
'Check if tag requires electronic signature
ESig.Initialize "Fix32.thisnode.DO1.F_CV"
ESig.IsSignatureRequired 0, bSigRequired, nInfo, bVerify, bContinuousUse
If bSigRequired = True Then
'Validate the signature, write the new value and send a message to the audit trail
NewValue = 1
If bVerify = False Then
ESig.ValidateSignatureAndWriteValue 0, NewValue, "admin", "admin", "Perform Comment Example"
Else
ESig.ValidateSignatureAndWriteValue 0, NewValue, "admin", "admin", "Perform Comment Example", "supervisor1", "GEF", "Verify Comment Example"
End If
Else
MsgBox "Signature is not required for this tag."
End If
Else
MsgBox "Signature is not enabled on this node."
End If