|
|||||
|
Returns
|
Method
|
Description
|
|
short
|
AddClassificatorAndTag
(string Trigger, string Class, string Logic, string type, string tag)
|
Adds a class and a tag to a classifier trigger. Logic: AND or OR; type: MUSTHAVE or MUSTNOTHAVE.
|
|
short
|
AddIntellitag
(string ListName, string Tag, string SearchValue, string SearchValueRegEx = "", short TagIsRegEx = 0, short Fuzzy = -1, string DocumentType = "", string MasterKey = "", string EntityID = "", string UserVal1 = "", string UserVal2 = "", string UserVal3 = "")
|
Adds an Intelli-Tag to a list: Tag is the text to search for and SearchValue the value or search macro (%NEARESTCODE%...). Optional: SearchValueRegEx (regular expression used by the macro), TagIsRegEx (1 if Tag is a regular expression), Fuzzy (tolerance 0-5, -1 = default), DocumentType and MasterKey (scope), EntityID and UserVal1..3. Returns 1 if added, -1 if it already exists, 0 on error or if the list does not exist.
|
|
short
|
AddLabel
(string tag_name)
|
Adds a label (batch labeling) to the batch by name. Returns 1 if added.
|
|
long
|
AddNewDocument
(string file)
|
Adds a new document from a file
Parameters
file (string): File to add
Returns: 1 = True, 0 = False
|
|
short
|
AI_AssistantRebuild
(string type, string field)
|
Rebuilds the vector indexes of the AI Assistants of the job. type: intellitags, helplists or all; field: the field name or all.
|
|
void
|
CancelProcess
()
|
Cancel current batch processing
|
|
short
|
CloseBatch
()
|
Closes and saves the batch.
|
|
short
|
DeleteAllDocuments
()
|
Empty the Batch
Returns: 1 = True, 0 = False
Example
Set batch = ChronoApp.GetCurrentBatch
Dim r
r = batch.DeleteAllDocuments
'Or
r = ChronoBatch.DeleteAllDocuments
|
|
short
|
DeleteBatch
()
|
Deletes the batch and all its documents.
|
|
short
|
DeleteDocument
(short numdoc)
|
Deletes a single document
Returns: 1 = True, 0 = False
|
|
short
|
DeleteDocumentType
(string documenTypeName)
|
Deletes a document type of the job by name. Returns 1 if deleted.
|
|
object
|
DuplicateDocument
(object doc, short CopyFields = 0, short CopyXgrid = 0)
|
Creates a copy of a document in the batch and returns the new document. CopyFields=1 copies the field values and CopyXgrid=1 the grid rows.
|
|
string
|
ENT_geturl
(string code = "batch_index")
|
Returns the URL of the batch in the ChronoScan Enterprise web client (code: batch_index by default) to include it, for example, in a notification e-mail.
|
|
short
|
EntAddToEventLog
(string description)
Since v1.0.2.95
|
It Adds a record to the event log in an enterprise app.
Parameters
description (string): The description to log
ChronoScan Enterprise only.
Example
ChronoBatch.EntAddToEventLog("description here")
|
|
short
|
ExecuteBarcode
()
|
Executes the barcode configurations on all documents/pages.
|
|
short
|
ExecuteInputModule
(string modname, string modparams)
|
Executes the specified input module
Parameters
modname (string)
image_files (import image files) - options:
directory = c:\temp
extensions = *.pdf | onlythisfile.pdf | *.pdf;*.pdfx
finddirs = true|false
textread = true|false
maxfiles =
pagestoextract =
extracmode = 0 (images) | 1 (convert to image)
resolution = 96|120|150|200|300|400|600
colortype = 0 (black and white) | 1 (color)
splitonfile = true|false
splitondir = true|false
orientateauto = true|false
deleteonimport = true|false
renameimportfile = sav
movetofolder = <c:\process_folder> or <\process_folder>
for_fast_text_processing = 1 (speed up text extraction, warning: setting this parameter to 1 means that image quality will be lower)
debug = 1 (allows to view the import options before import)
pdf_files (import PDF files with text extraction and image conversion) - options:
directory = c:\temp
filename = *
extension = *
finddirs = true|false
maxfiles =
splitonfile = true|false
splitondir = true|false
importfromlastfile = true|false
deleteonimport = true|false
renameimportfile = sav
movetofolder = <c:\process_folder> or <\process_folder>
debug = 1 (allows to view the import options before import)
modparams (string): ConfigName#parameter=value#parameter=value
Returns: 1 = True, 0 = False
Example
ChronoBatch.ExecuteInputModule "pdf_files", "ConfigName#directory=c:\temp#filename=*#finddirs=true..."
|
|
short
|
ExecuteProcess
(string operations)
|
Runs a processing chain on the batch. Returns 1 on success.
Parameters
operations (string): Use ";" to execute more than one operation at once (ex: DESKEW;OCR). If empty will use the configured options on the Batch.
Allowed values: CROP, DESKEW, OCR, PRETRIGGERS, TYPEDETECT, FIELDREAD, XGRIDREAD, PATTERNREAD, EXPORTBATCH, BEEP, SENDMAIL
Returns: 1 = True, 0 = False
Example
Dim res
res = ChronoBatch.ExecuteProcess("DESKEW;OCR;SENDMAIL")
|
|
short
|
GetBatchFieldCount
()
|
Returns the number of batch fields defined in the job.
|
|
string
|
GetBatchFieldName
(short index)
|
Returns the name of the batch field at the given index (0-based).
|
|
string
|
GetBatchFieldValidateMessage
(string FieldName)
|
Returns the validation message of a batch field (empty if it is valid).
|
|
short
|
GetBatchFieldValidateStatus
(string FieldName)
|
Returns the validation status of a batch field (1 = valid, 0 = invalid).
|
|
string
|
GetBatchFieldValue
(string FieldName)
|
Returns the value of a batch field (batch fields have one value per batch and are defined in the job).
|
|
string
|
GetConversionModule_File
(short item, string ConvModule)
|
Returns the file generated by specific conversion module
Example: see example 1 at the end of this page.
See also: Executing vbscript before after export
|
|
short
|
GetConversionModule_FileCount
(string ConvModule)
|
Returns the number of files generated by specific conversion module
Example: see example 1 at the end of this page.
See also: Executing vbscript before after export
|
|
string
|
GetDateCreated
()
|
Returns Batch date creation
Returns: Batch date creation
Example
Dim date
date = ChronoBatch.GetDateCreated()
|
|
string
|
GetDateUpdated
()
|
Returns Batch update date
Returns: Batch update date
Example
Dim date
date = ChronoBatch.GetDateUpdated()
|
|
long
|
GetDocCount
()
|
Returns the number of documents
Returns: Number of documents of the batch
Example
Dim numdocs
numdocs = ChronoBatch.GetDocCount()
|
|
long
|
GetDocCountStatus
(short status)
|
Returns the number of documents with a specific status.
Parameters
status (short): 0 = validated
1 = error
Returns: Number of documents
|
|
object
|
GetDocument
(short item)
|
Returns the ChronoDocument object of a document of the batch (item = document number, 0-based).
Parameters
item (short): Document number
Returns: ChronoDocument (https://chronoscan.org/doc/chronodocument.htm)
|
|
string
|
GetEntityDescription
()
|
Returns the Batch Entity Description
|
|
string
|
GetEntityID
()
|
Returns the Batch Entity ID
|
|
string
|
GetEntityName
()
|
Returns the Batch Entity Name
|
|
string
|
GetEntStatus
()
|
Gets the batch status for an enterprise batch
Returns: unknown, increation, created, pre_class, reprocess, processed, post_class, configured, corrected, exported, export_error_status, archived, parked, processing_error, ready_to_export, waiting_external_actions
ChronoScan Enterprise only.
Example
dim r
r = ChronoBatch.GetEntStatus()
msgbox "status is: " & status
|
|
short
|
GetExportStatus
()
|
Returns the export status
Returns: 0 = not exported, 1 = exported ok, 2 = not exported because of not validated documents, 3 = error exporting, 4 = export canceled
Example
Dim res
res = ChronoBatch.GetExportStatus()
|
|
string
|
GetJobName
()
|
Returns job name
Returns: Job name
Example
Dim jobname
jobname = ChronoBatch.GetJobName()
|
|
variant
|
GetLabels
()
|
Returns an array with the names of the labels of the batch.
|
|
short
|
GetLastInputCount
()
|
Returns the number of documents generated by last scan/import process
Returns: Number of documents
Example
Dim red
res = ChronoBatch.GetLastInputCount()
|
|
string
|
GetName
()
|
Returns batch name
Returns: Batch name
Example
Dim batchname
batchname = ChronoBatch.GetName()
|
|
string
|
GetOcrText
()
|
NOT IMPLEMENTED: this method always returns an empty string. Use ChronoDocument.GetFullOcr instead.
|
|
string
|
GetOutModule_ConfigValue
(string OutModuleName, string itemName)
|
Returns a configuration value (itemName) of an output module of the job (OutModuleName), for example a destination folder.
|
|
object
|
GetOutModule_MFilesServerApplication
(string OutName, short cacheconnection = 0)
|
Returns the M-Files server application object (M-Files COM API) of an M-Files export module of the job, so the script can use the M-Files API with the same connection.
Parameters
targetDocNumber (String ): M-Files export module configuration
Example
Set oServerApp = Batch.GetOutModule_MFilesServerApplication("M-FILES")
See also: Drex chronobatch custom
|
|
object
|
GetSelectedDocument
()
Since v1.0.2.85
|
Returns first selected found ChronoDocument object
Returns: ChronoDocument: object (https://chronoscan.org/doc/chronodocument.htm)
Example
Set doc = ChronoBatch.getSelectedDocument()
|
|
string
|
GetSystemField
(short item, string FieldName)
|
Returns the value of a specific system row/field
Parameters
item (short): Document number
FieldName (string): System field name
Returns: System field value
Example: see example 2 at the end of this page.
|
|
string
|
GetUserField
(short item, string FieldName)
|
Returns the value of a specific row/field
Parameters
item (short): Document number
FieldName (string): Field name
Returns: User field value
Example
Dim val
val = ChronoBatch.GetUserField(docnumber, fieldName)
|
|
string
|
GetVariableValue
(string varname)
|
Returns a ChronoScan variable, it includes variables related with the batch
Parameters
varname (string): Requested variable to ChronoScan, for example "station_id". You can see a complete variable list in the variables wizard window of ChronoScan.
Returns: Value for the selected ChronoScan variable.
|
|
string
|
GetXgridColumnValue
(short item, short GridPanel, short row, short col)
|
Return the value of a specific capture grid field by column number
Parameters
item (short): Document number
GridPanel (short)
Allowed values: 1, 2, 3, 4
row (short): Row number (0 based)
col (short): Column number (0 based)
Returns: Capture grid field
|
|
short
|
GetXgridFieldBitmap
(short item, short GridPanel, short row, string FieldName, string bmpFile)
|
Save the zone bitmap of a specific capture grid field to a file
Parameters
docNumber (short): Document number
gridNumber (short)
Allowed values: 1, 2, 3, 4
gridRowNumber (short): Row number (0 based)
fieldName (string): Column number (0 based)
Returns: 1 = True, 0 = False
Example: see example 2 at the end of this page.
|
|
string
|
GetXgridFieldValue
(short item, short GridPanel, short row, string FieldName)
|
Returns the value of a specific capture grid field
Parameters
item (short): Document number
GridPanel (short)
Allowed values: 1, 2, 3, 4
row (short): Row number (0 based)
FieldName (string): Field name
Returns: Capture grid field
Example: see example 2 at the end of this page.
|
|
short
|
GetXgridLastEdited
()
|
Returns the number of last edited capture grid, This function can be used in OnXGridValueChanged event
Returns: 1, 2, 3, 4
|
|
string
|
GetXgridLastEditedField
(short GridPanel)
|
Return the name of last capture grid edited field, This function can be used in OnXGridValueChanged event
Parameters
GridPanel (short)
Allowed values: 1, 2, 3, 4
Returns: Name of the field
|
|
short
|
GetXgridRowCount
(short item, short GridPanel)
|
Return the number of records of a specific capture grid
Parameters
item (short): Document number (0 based)
GridPanel (short)
Allowed values: 1, 2, 3, 4
Returns: Number of rows
Example: see example 2 at the end of this page.
|
|
short
|
HasLabel
(string tag_name)
|
Returns 1 if the batch has the given label.
|
|
short
|
IgnoreDocument
(short doc, short mode = -1)
|
Ignores/ unignores a specific document
Parameters
doc (short): (1 based)
mode (short)
Allowed values: 0: Set as not ingored, 1: Ignore
Returns: 1 = True, 0 = False
Example
'Ignore a document
dim r
r = ChronoBatch.IgnoreDocument(1, 1)
|
|
short
|
IsDocumentIgnored
(short doc)
|
Tells us if a specific document is ignored
Parameters
doc (short): (1 based)
Returns: 1 = True, 0 = False
Example
dim r
r = ChronoBatch.IgnoreDocument(1)
|
|
short
|
IsValidated
(short item)
|
Return whether a document is validated
Parameters
item (short): Document number (0 based)
Returns: 1 = True, 0 = False
See also: Executing vbscript before after export
|
|
short
|
LinkDocumentTypeMasterkey
(string documenType, string masterkey)
|
Links a document type to a masterkey (masterkey setups). Returns 1 on success.
|
|
string
|
MergeDocuments
(short document1, short document2)
|
Merge two documents
Parameters
document1 (short): Target document number
document2 (short): Document number to merge
Returns: 1 = True, 0 = False
Example: see example 3 at the end of this page.
See also: Executing vbscript before after export
|
|
short
|
RemoveLabel
(string tag_name)
|
Removes a label from the batch by name. Returns 1 if removed.
|
|
short
|
Save
(short syncronizedb = 1)
|
Save Changes on the Batch
Parameters
syncronizedb (short) optional: default (1) synchronize the data in the database (ENT)
Returns: 1 = True, 0 = False
|
|
short
|
SetBatchFieldValue
(string FieldName, string Value)
|
Sets the value of a batch field; the field must exist in the job. The field is validated again and the form is refreshed. Returns 1 on success.
|
|
short
|
SetEntityID
(string entityID)
|
Sets an entity to a batch
Parameters
entityID (string): new entity ID
Returns: 0 = false, 1 = true
Example
Dim entityID
entityID = 12
res = ChronoBatch.SetEntityID(entityID)
|
|
short
|
SetEntStatus
(string newstatus)
|
Sets the batch status to an enterprise batch
Parameters
newstatus (string)
Allowed values: unknown, increation, created, pre_class, reprocess, processed, post_class, configured, corrected, exported, export_error_status, archived, parked, processing_error, ready_to_export, waiting_external_actions
Returns: 1 = True, 0 = False
ChronoScan Enterprise only.
Example
dim r
r = ChronoBatch.SetEntStatus("created")
|
|
short
|
SetExportStatus
(short newstatus)
|
Sets the export status
Parameters
newstatus (short): 0 = not exported
1 = exported ok
2 = not exported because of not validated documents
3 = error exporting
4 = export canceled
Returns: 0 = false, 1 = true
Example
'Set a batch status as "exported without errors"
Dim res
res = ChronoBatch.SetExportStatus(1)
|
|
short
|
SetUserField
(short item, string FieldName, string Value)
|
Update Field value of a specific row/field
Parameters:
Short document number
String Field name
String new value
Sample: Executing vbs script before/after export
|
|
short
|
UnLinkDocumentTypeMasterkey
(string documenType, string masterkey, short deleteTypeWhenNoLinks)
|
Removes the link between a document type and a masterkey; deleteTypeWhenNoLinks=1 deletes the type when no masterkey is linked to it any more.
|
|
short
|
ValidateBatchFields
()
|
Validates all the batch fields (required, validation mask and type). Returns 1 if all of them are valid.
|