Use a script variable to set field confidence

This example shows how to use a script variable to set a field's confidence threshold.

Script variables are stored in an XML file external to the project, which can be updated separately. For this example, a script variable named Threshold is configured. For more information, refer to the Help for Project Builder .

' Project Script
Private Sub Document_BeforeExtract(ByVal pXDoc As CASCADELib.CscXDocument)

   Dim sThreshold As String

   sThreshold = Project.ScriptVariables.ItemByName("Threshold").Value
   Project.ClassByName("ClassA").Fields.ItemByName("Surname").LocatorThreshold = CDbl(sThreshold)

End Sub