Skip to main content

Get-Filed-List-of-Template

Command Description

Get field list of custom template in extractor from Laiye IDP interface

Command Prototype

arrayRet = Mage.GetOCRTemplateFieldList(extractor,template_name,time)

Parameter Description

ParameterRequiredTypeDefaultDescription
extractorTrueexpression{}Select the recognizer of the custom template
template_nameTruestring""Select a custom template name
timeTruenumber30000Specify the waiting time in milliseconds. If exceeded, an exception will be thrown. Default: 30,000 milliseconds (30 seconds)

return

arrayRet,The variable used to save the output of the command.

Demo

Dim extractor={"Pubkey":"","Secret":"","Url":""}  //  Obtained from mage, you need to create the corresponding model in "Custom Template Recognition" first 
Dim template_name="" // Requires the template name of the query field

TracePrint "--------------------Get the field list of the template--------------------"
// --------------------------------------------------------
// [Remarks] Get the field list of the template
// Input parameter 1:
// extractor--recognizer, select the mage recognizer to use
// Input parameter 2:
// template_name--template name
// Input parameter 3:
// time--timeout time. Default unit: milliseconds. Type: Int

// Output parameters:
// arrayRet--The variable to which the output of the function call is saved

// Command prototype: arrayRet = Mage.GetOCRTemplateFieldList(extractor,template_name,time)
// --------------------------------------------------------

arrayRet = Mage.GetOCRTemplateFieldList(extractor,template_name,30000)
Traceprint(arrayRet)