GetSignatureAndWriteValue Method Example
The following example creates the ESignature object, checks to see if the node is enabled for electronic signature, determines if the tag FIX32.thisnode.D01.F_CV requires electronic signature, captures 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 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
If bSigRequired = True Then
'Capture the signature, write the new value and send a message to the audit trail
NewValue = 1
ESig.GetSignatureAndWriteValue 0, NewValue
Else
MsgBox "Signature is not required for this tag."
End If
Else
MsgBox "Signature is not enabled on this node."
End If