IsSignatureRequiredForList Method Example

The following example creates the ESignature object, checks to see if the node is enabled for electronic signature and determines if a set of tags require electronic signature.

Dim ESig As Object

Dim bNodeSignEnabled As Boolean

Dim bSigRequired As Boolean

Dim bValidSig As Boolean

Dim info As Integer

'Create the list of data sources

Dim DataSources As Variant

ReDim DataSources(2) As String

DataSources(0) = "Fix32.THISNODE.TAG1.F_CV"

DataSources(1) = "Fix32.THISNODE.TAG2.F_CV"

'Create the ESignature object

Set ESig = CreateObject("ElectronicSignature.ESignature")

'Check if node is enabled for electronic signature

ESig.IsNodeSignEnabled bNodeSignEnabled

If bNodeSignEnabled = True Then

'initialize the object and set data sources

ESig.InitializeList DataSources

'Is signature required for data sources

ESig.IsSignatureRequiredForList 4, bSigRequired, info

If bSigRequired Then

'signature is required for this list

MsgBox “Signature is required.”

Else

'signature is not required for this list, check info parameter for reason

MsgBox “Signature is not required.”

End If

Else

'the hardware key is not enabled for signature, security is disabled, or bypass signature is in effect

MsgBox “Signature is not enabled on this node.”

End If