The Interface Objects

The PSIcapture scripting environment exposes subsets of the major classes whose objects comprise a batch. These objects are passed into various script methods, allowing the script to access batch values for decision making. The objects themselves are not editable; however, some of the properties within the objects can be manipulated either directly or through exposed methods in the classes.

The following page describes the basic hierarchy of a batch as it applies to scripting, and provides descriptions of the interface classes used to represent these objects.

Examples:

  • A batch object is described using the IBatch class.
  • Within the batch object, there is a collection of folders which is represented by the IFolders class.
  • Each folder inside the folders collection is represented by the IFolder class.
  • Each folder contains a set of documents, which is represented by the IDocuments class.

Basic Batch Hierarchy

The following diagram is a simplified view of the basic batch hierarchy. Each box is represented by an interface class. These classes are discussed in detail in the next section.

Drag and Drop

Users have the ability to drag and drop available scripts from the left panel into the scripting panel. NOTE: There are limitations to what you can drag as outlined below.

Cannot drag to:

  • Open and ending brackets { }
  • The Catch section
  • The class definition
  • The function definition

Class Descriptions

IAlert

Alerts are used to notify the user of a specific condition.

IAlert Properties

NameTypeEditableDescription
AlertTypeAlertTypesNo*Gets the type of alert applied to the context object.
MessagestringNo*Gets the message assigned to the alert.

*Alerts can be added or removed through the methods in the IAlerts class (see below).

IAlerts

This is a collection of IAlert objects

IAlerts Properties

NameTypeEditableDescription
IAlerts[AlertType]IAlertNo

Returns the specified IAlert object from the collection based on the supplied alert type.

ex. document.Alerts[AlertTypes.LookupFailed]

IAlerts Methods


IBarcode

An IBarcode object contains the metadata describing a single recognized barcode.

IBarcode Properties

NameTypeEditableDescription
AreaRectangleFNoGets the area of the barcode. This is an axis aligned bounded box that contains the entire area of the barcode data on the image.
ConfidenceLevelIntegerNoGets the confidence level reported by the barcode recognition engine when reading this barcode. Not all barcode types may provide a confidence level.
DataStringNoGets the raw barcode data decoded at the time of read.
NameStringNoGets the display name of the barcode type recognized for this barcode.
NumberIntegerNoGets the barcode number assigned to this barcode. Barcodes are read and numbered left to right, top to bottom.
NumberCheckSumCharactersIntegerNoGets the number of check sum characters that were read for this barcode. Not all barcode types support check sum characters.
OrientationIntegerNoGets the orientation of the barcode, as reported by the recognition engine.
TypeBarcodeTypesNoGets the barcode type (see Enumerations).
ValidCheckSumBooleanNoGets a value indicating whether the check sum value read is valid. Not all barcode types support check sums.
ValueStringNoGets the final barcode value. This value is assigned after all data cleanup, splitting, etc., has been applied.

IBatch

The IBatch object contains general information concerning the overall batch.

IBatch Properties

NameTypeEditableDescription
AlertsIAlertsNo*A list of all alerts - see the The Interface Objects#alert for more details
AutoRecognitionBatchBooleanNoWas the batch created by PSIcapture auto recognition
BatchNameStringNoThe name assigned to the batch
BatchNoteStringYesComments entered for the batch
BookmarkIBatchBookMarkNo**The batch's bookmarked folder, document and/or page
CompletedBooleanNoReturns true if the batch has been completed
CompletionDateDate/TimeNoThe date and time the batch completed, if applicable
CreateDateDate/TimeNoThe date and time the batch was created
CreatedByStringNoThe user ID of the user who created the batch
CurrentWorkflowStepIntegerNoThe current workflow step number
DeadlineDateDate/TimeNoThe date and time when the batch's next deadline will expire
DocumentCountIntegerNoThe number of documents in the batch
DocumentRecordCountIntegerNoThe number of data records across all documents in the batch
DocumentTypeIDocumentTypeNoThe Capture Profile that was used to create the batch. Use it to access all of the batch's settings.
ExceptionsBatchBooleanNoIs the batch an exceptions batch?
ExceptionsBatchIDIntegerNoIf the batch contained exceptions, this is the unique ID number for the exceptions batch
ExpectedCountsIExpectedCountsNoThe expected folder, document, page, etc., counts as defined in the Capture Profile
ExpectedCountValidationExpectedCountValidationTypesNoThe method used to validate expected counts (NoValidation, ValidationTotals, ValidateByLevel)
FlagFlagTypesYesFlags the batch using one of the available flag types
FolderCountIntegerNoThe number of folders in a batch
FoldersIFoldersNoThe collection of folders in the batch. This object provides access to the documents (IDocuments collection) in each folder. See the The Interface Objects#folderThe Interface Objects#folder for details.
HeldBatchBooleanNoIs the batch held?
HighPriorityBatchBooleanYes***Is this a high-priority batch?
IDIntegerNoThe unique batch ID assigned by PSIcapture
PageCountIntegerNoThe total number of pages in the batch
PathStringNoThe batch storage path
RecordIDataRecordNoThe data record containing the batch-level index values
SeparatorSheetIPageNoThe separator page, if applicable. See the The Interface Objects#page for details.
SuspendedBatchBooleanNoHas the batch been suspended?
WorkflowStepCountIntegerNoThe total number of workflow steps for the batch

*Alerts can be added or removed through the methods in the The Interface Objects#alert.

**Use the SetBookmark method explained in the below section to alter bookmarks.

*** In order to change the value of the HighPriorityBatch property, you must return true from the EnableUnrestrictedCode script method.

IBatch Methods


IBatchBookmark

The folder, document, and/or page bookmarked in the batch. These values are set using the SetBookmark method in IBatch.

IBookmark Properties

NameTypeEditableDescription
BookmarkFolderIFolderNoThe folder to bookmark
BookmarkDocumentIDocumentNoThe document to bookmark
BookmarkPageIPageNoThe page to bookmark

IBatesStamp

The name and value information for a single Bates stamp.

IBatesStamp Properties

NameTypeEditableDescription
NameStringNoThe Bates stamp name
ValueStringNoThe value of the Bates stamp

ICharacterZone

ICharacterZone contains the properties of a single character (OCR) zone.

ICharacterZone Properties

NameTypeEditableDescription
AreaRectangleFNoThe zone bounds
ConfidenceDoubleNoThe percentage of confidence in the OCR result (0-100)
IsMultiRecLineZoneBooleanNoTrue if the zone represents a multi-record line item zone
NameStringNoThe zone name
NumberIntegerNoThe zone number
ValueStringNoThe zone's value

IDataField

Represents a single index data field.

IDataFieldProperties

NameTypeEditableDescription
IDLongNoThe index field's unique identifier
NameStringNoThe index field name
DataTypeDataFieldDataTypesNoThe data type of the index field
FieldTypeDataFieldTypesNoIndicates the index field type (batch, folder, document, or system)
RecordTypeStringNoThe record type associated with the index field
RecordTypesList of StringNo
DefaultValueStringNoThe default value for the index field
InputMaskStringNoThe input mask for the index field to force correct formatting
MinimumLengthIntegerNoThe minimum allowed length
MaximumLengthIntegerNoThe maximum allowed length
RequiredBooleanNoIndex value required flag
SkipBooleanNoIndex field Skip flag
StickyBooleanNoIndex field Sticky flag
ReKeyBooleanNoIndex field ReKey flag
HideBooleanNoIndex field Hide flag
ReadOnlyBooleanNoIndex field Read-only flag
SynchronizedBooleanNoIndex field synchronization flag (used for multi-record processing)
UseSelectionListBooleanNoIndicates if the index field should be populated from a user-supplied list
LimitEntryToSelectionListBooleanNoFlag to determine if the user supplied list of values is editable
AppendUserEntriesToSelectionListBooleanNoFlag to signify if new entries entered by users on the index form should be appended to the list
ListSelectionItemsList of IListSelectionItemNoUser-supplied list of values
AutoIncrementBooleanNoIndex field will auto-increment
AutoIncrementCounterNameStringNoThe counter used for auto-incrementing an index field
IsAutoIncrementSharedCounterBooleanNoFlag for whether or not AutoIncrementCounterName is a shared counter
MapFieldToBarcodeBooleanNoDetermines if the index field is to be populated from a barcode
BarcodeTypeBarcodeTypesNoWhen the index field is set to populate from a barcode, this defines the type of barcode to use
BarcodeNumberIntegerNoSpecifies which barcode to use if multiple ones of the same type are found
BarcodePageNumberIntegerNoSpecifies which page number to use when locating the barcode
ZoneNameStringNoThe name of the zone associated with the index field
ZoneActionDataFieldZoneActionsNoThe type of zone associated with the index field

IDataFields

Represents a collection of index fields (IDataField objects as described in the section above).

IDataFields Properties

NameTypeEditableDescription
IDataFields[IndexName]IDataFieldNoReturns the specified IDataField object from the collection based on the supplied index field name
FieldNamesArray of StringsNoThe index field names of each IDataField object in the collection

IDataFields Methods


IDataFieldValue

Represents an individual index field value. A collection of IDataFieldValue objects makes up one IDataRecord.

IDataFieldValue Properties

NameTypeEditableDescription
NameStringNoThe index field name associated with this value
DataTypeDataFieldDataTypesNoThe data type
AlertsIAlertsNoThe list of alerts associated with this index value
ValueObjectYesThe index value
StringValueStringNoThe textual representation of the index value
ValueSetByScriptBooleanNoTrue if you change the Value property from within the scripting environment
ReindexValueObjectYesThe value re-keyed in the second indexing step when the Indexing re-key option is enabled
ReindexValueSetByScriptBooleanNoTrue if you change the ReindexValue property from within the scripting environment
TypedValueObjectNoThis is the Value of the index field that has been cast to the index field's defined value
ValidatedBooleanNoFlag that signals if the index value has already been passed through validation
DataSourcePageNumberIntegerNoThe source page number that produced the OCR value stored in the index field
DataSourceBoundsRectangleFNoThe bounds of the OCR zone that produced the OCR value stored in the index field
OCRConfidenceLevelFloatNoThe OCR confidence level of the OCR value used to populate the index field. Expressed as a decimal number from 0 to 1.
BypassOcrConfidenceLevelCheckBooleanYesTrue if you want to bypass further OCR confidence level checks in validation

IDataFieldValue Methods


IDevicePage (v5.3.1+)

Represents information about a single page image.

IDevicePage Properties

NameTypeEditableDescription
FrontBooleanNoWhether or not the image is the front side of a page.
SourceFileStringNoThe path and file name of the imported file that contained this page.
ImageHeightIntegerNoThe image height
ImageWidthIntegerNoThe image width
ImprintIImprintNoThe imprinted text on this page (if any)
OrientationIsIndeterminateBooleanNoTrue if the PSIcapture default auto-orientation engine could not accurately determine the orientation of the image.
BarcodesList of IBarcodeNoThe list of barcodes on the page
PatchCodesList of IPatchCodeNoThe list of patch codes on the page
FirstPageOfImportedFileBooleanNoWhether or not this is the first page of the imported file
BlankPageBooleanNoWhether or not this is a blank page
SourceFilePageNumberIntegerNoThe page number for this page within the source file
SourceFileCreateDateTimeDate/TimeNoThe source file creation timestamp as reported by Windows
SourceFileModifiedDateTimeDate/TimeNoThe source file modification timestamp as reported by Windows
BarcodeRecognitionCompletedBooleanNoWhether or not barcode recognition has completed for this page
PatchCodeRecognitionCompletedBooleanNoWhether or not patch code recognition has completed for this page
BlankPageRecognitionCompletedBooleanNoWhether or not blank page detection has completed for this page
UsedOCRBooleanNoIndicates if OCR operations were performed for this page
UsedICRBooleanNoIndicates if ICR operations were performed for this page
UsedADEBooleanNoIndicates if ADE operations were performed for this page

IDataRecord

Contains a list of IDataFieldValues that make up a single batch, folder, or document record.

IDataRecord Properties

NameTypeEditableDescription
RecordIndexIntegerNoThe record index
FieldNamesArray of StringNoThe names of each index field in the record
IsAutoCreatedRecordBooleanNoFlag to indicate the record was created automatically
RecordTypeStringYesThe record type assigned to the record
AutoCreatedRecordTagStringNo
RelatedRecordsArray of IDataRecordNoThe list of records related to this record
IDataRecord[IndexName]IDataFieldValueNoReturns the specified IDataFIeldValue object from the collection based on the supplied index field name

IDataRecord Methods


IDocument

Represents a single document in the batch.

IDocument Properties

NameTypeEditableDescription
IDIntegerNoDocument ID
NameStringNoDocument name
DocumentPathStringNoExternal document path and file
DocumentNumberIntegerNoDocument sequence in the folder
DocumentNumberInBatchIntegerNoDocument sequence in batch
DocumentNoteStringYesNotations about the document
IndexedBooleanYesFlag signaling that indexing has been performed on this document
IndexedByStringYesUser performing the index operation
ReIndexedBooleanYesFlag signaling that re-indexing has been performed on this document
ReIndexedByStringYesUser performing the re-index operation
LookupMultirecHasBeenRunBooleanNoA flag indicating that lookup queries have been run for all document records in a multi-record process
ClassificationFormIDStringNoThe classification form ID (if classification produced this document)
ClassificationFormPageCountIntegerNoThe number of pages in the classification document
ClassificationDocumentIDStringNoThe combination of the classification form ID and the document ID
RecordsIDataRecordsNo*The list of records for the document
PagesIPagesNoThe collection of pages in the document
PageCountIntegerNoThe document page count
PagePathsArray of StringsNoThe path and file name for each page image in batch storage
SeparatorSheetIPageNoThe page that caused document separation
SeparatorValueStringNoThe detected value that cause document separation (if any)
DocumentFilesIDocumentFilesNoThe collection of external file information for all pages of the document
AlertsIAlertsNo**The list of document alerts
FlagFlagTypesYesThe specified flag for the document (if any)
BatchIBatchNoThe document's batch
FolderIFolderNoThe document's folder
DocumentBarcodesList of IBarcodeNoThe list of barcode objects for the document

*Records can be added to the document through the AddNewRecord method explained in the below section.

**Alerts can added or removed through the methods in the IAlerts class or through the SetValidationAlert method explained in the below section.

IDocument Methods


IDocumentFile

An external file of information associated with a document.

IDocumentFile Properties

NameTypeEditableDescription
DocumentIDocumentNoThe parent document
FileSourceDocumentFileSourceNoThe source of the document file (see Enumerations)
FileTagStringNoThe tag assigned to the file
FileTypeStringNoThe type of the original image file
FullPathStringNoThe full path and file name
IDIntegerNoA unique ID for the object
IsDirectoryBooleanNoWhether or not the IDocumentFile object represents a directory or a file
PathStringNoThe path for the file

IDocumentFiles

The collection of IDocumentFile objects for a document.

IDocumentFiles Methods


IDocuments

This represents the collection of documents for a given folder.

IDocuments Methods


IDocumentType

This is a subset of the parameters for the Capture Profile used to create the batch.

IDocumentType Properties

NameTypeEditableDescription
IDLongNoThe Capture Profile's unique ID
NameStringNoThe Capture Profile name
CreatedDate/TimeNoThe date and time the Capture Profile was created
DescriptionStringNoDescribes the Capture Profile
GroupStringNoThe display group
BatchFieldsIDataFieldsNoThe list of batch index fields
FolderFieldsIDataFieldsNoThe list of folder index fields
IndexFieldsIDataFieldsNoThe list of document index fields
DefaultExpectedCountsIExpectedCountsNoThe expected count object collection
ExpectedCountValidationExpectedCountValidationTypesNoThe method used to validate expected counts (NoValidation, ValidationTotals, ValidateByLevel)
DocumentRecordTypesArray of StringsNoThe list of record types

IExpectedCounts

This represents the Expected Count Validation for the batch as specified in the Capture Profile.

IExpectedCounts Properties

NameTypeEditableDescription
DocumentsPerFolderIntegerNoDocuments per folder setting
DocumentsPerFolderOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page
FoldersPerBatchIntegerNoFolders per batch setting
FoldersPerBatchOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page 
PagesPerDocumentIntegerNoPages per document setting
PagesPerDocumentOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page 
TotalDocumentsIntegerNoTotal documents per batch setting
TotalDocumentsOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page 
TotalFoldersIntegerNoTotal folders per batch setting
TotalFoldersOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page 
TotalPagesIntegerNoTotal pages per batch setting
TotalPagesOperatorExpectedCountOperatorsNoSee ExpectedCountOperators on the Enumerations page 

IFolder

IFolder represents a single folder object in the batch.

IFolder Properties

NameTypeEditableDescription
AlertsIAlertsNo*The folder's alert collection
BatchIBatchNoThe parent batch
DocumentsIDocumentsNoThe folder's document collection
FlagFlagTypesYesThe folder's flag
FolderNoteStringYesA note describing the folder
FolderNumberIntegerNoThe sequential folder number
FolderPathStringNoThe path for the folder's storage in the batch
IDIntegerNoThe unique folder ID
IndexedBooleanNoFlag signaling that indexing has been performed on this folder
NameStringNoThe folder name
RecordIDataRecordNoThe folder's single record
ReIndexedBooleanNoFlag signaling that re-indexing has been performed on this folder
SeparatorSheetIPageNoThe folder's separation page
SeparatorValueStringNoThe detected value that caused folder separation (if any)
PageCountIntegerNoThe total number of pages across all documents in the folder

*Alerts can be added or removed through the methods in the IAlerts class or through the SetValidationAlert method explained in the section below.

IFolder Methods


IFolders

The IFolder object represents the collection of folders for a batch.

IFolders Methods


IImprint

References the imprinted text for a document page.

IImprint Properties

NameTypeEditableDescription
LeftIntegerNoThe left offset for the text
TextStringNoThe imprinted text
TopIntegerNoThe top offset for the text

IListSelectionItem

IListSelectionItem represents an individual item in a user-defined list for populating index fields.

IListSelectionItem Properties

NameTypeEditableDescription
DataValueStringNoThe actual value for the index
DisplayValueStringNoThe value display in the list on the Index form

IMarkArea

This represents the area for an individual OMR item.

IMarkArea Properties

NameTypeEditableDescription
AdjustedNetWeightIntegerNoThe value used to actually make OMR selections based on marked weight
AreaRectangleFNoThe mark area
BaseWeightIntegerNoThe pixel weight of this area on the template image
EffectiveBaseWeightIntegerNoThe actual base weight used in all calculations. This will be 0 if the option to ignore base weights has been selected.
MaximumWeightIntegerNoThe calculated maximum possible weight for the given area. This is used for calculating the scaled weight.
NetWeightIntegerNoThe raw filled pixel count less the base weight
ScaledWeightIntegerNoThe weight value for the area, scaled into a percentage of maximum weight (0-100).
SelectedBooleanNoA flag indicating whether or not the mark area has been filled in, or has been filled in the most compared to other boxes that may have been partially filled in.
TagStringNoA tag assigned to the mark
ValueStringNoThe associated value for the mark
WeightIntegerNoThe raw pixel count for filled pixels in the area
WeightAdjustmentIntegerNoThe difference between Weight and NetWeight, which produces AdjustedNetWeight

IMarkZone

This represents an OMR zone which contains an array of IMarkArea objects.

IMarkZone Properties

NameTypeEditableDescription
MarkAreasList of IMarkAreaNoThe individual mark area that make up the zone
NameStringNoThe zone name
NumberIntegerNoThe zone number
ValueStringNoThe zone value

IPage

This represents a single page within a document.

IPage Properties

NameTypeEditableDescription
IDIntegerNoUnique page ID
NameStringNoPage name
PathStringNoThe path to the image file in batch storage
PageNumberIntegerNoThe page number in the document
PageNoteStringYesNotes about the page
HorizontalResolutionIntegerNoHorizontal image resolution
VerticalResolutionIntegerNoVertical image resolution
FrontPageBooleanNoFlag to signal if this is a front page
BlankPageBooleanNoFlag to signal if this is a blank page
DocumentSeparatorBooleanNoFlag to signal if this is a document separation page
FolderSeparatorBooleanNoFlag to signal if this is a folder separation page
PageColorImageColorTypesNoThe color setting for the page (see Enumerations)
SourceFileStringNoThe source file that produced the page
SourceFilePageNumberIntegerNoThe page number in the original source file
FlagFlagTypesYesPage flag
AlertsIAlertsNo*Page alerts
DocumentIDocumentNoThe page's parent document
AlternatePageFilesIPageFilesNoA collection of alternate page files
BarcodesList of IBarcodeNoThe page's barcode collection
PatchCodesList of IPatchCodeNoThe page's patch code collection
BatesStampsList of IBatesStampNoThe page's Bates stamp collection
ImprintIImprintNoThe page's imprinted text
OCRConfidenceLevelFloatNoThe OCR confidence level (0-100)
WordsList of IWordNoThe word collection
CharacterZonesList of ICharacterZoneNoThe character zone collection
MarkZonesList of IMarkZoneNoThe mark zone collection
PDFBookmarksIPDFBookmarksNoThe PDF bookmark collection
RedactionResultsList of IRedactionResultNoThe redaction results collection

*Alerts can be added or removed through the methods in the IAlerts class or through the SetValidationAlert method explained in the section below.

IPage Methods


IPages

Represents a document's IPage collection.

IPages Methods


IPageFile

An external file of information associated with a document's page.

IPageFIle Properties

NameTypeEditableDescription
FileSourcePageFileSourceNoThe origin of the page file (see Enumerations)
FileTagStringNoThe textual identifier for the page file
FileTypeStringNoThe type of file
IDIntegerNoThe unique ID for this page file
PageIPageNoThe parent page
PathStringNoThe path for the page file

IPageFiles

Contains a collection of IPageFile objects.

IPageFiles Properties

NameTypeEditableDescription
PageIPageNoThe associated document page

IPageFiles Methods


IPatchCode

This represents an individual patch code object.

IPatchCode Properties

NameTypeEditableDescription
AreaRectangleFNoThe area on the page containing the patch code
ConfidenceLevelIntegerNoThe confidence level (0-100)
NumberIntegerNoThe sequence of the patch code on the page
TypePatchCodeTypesNoThe patch code type (see Enumerations)
SkewAngleIntegerNoThe angle at which the patch code is skewed

IPDFBookmark

This represents an individual PDF bookmark object.

IPDFBookmark Properties

NameTypeEditableDescription
ColorColorNoThe System.Drawing.Color of the bookmark
FontStyleFontStyleNoThe font style
LevelIntegerNoIt will be an integer value >= 1
NameStringNoThe bookmark name

IPDFBookmarks

Represents a collection of IPDFBookmark objects.

IPDFBookmarks Properties

NameTypeEditableDescription
PageIPageNoThe page containing the bookmarks

IPDFBookmarks Methods


IRedactionResult

This represents a single redaction result on a page.

IRedactionResult Properties

NameTypeEditableDescription
RedactionTypeRedactionTypesNoSee the RedactionTypes section on the Enumerations page.
BoundsRectangleFNoThe area of the redaction
RedactedWordStringNoThe word that was redacted
MatchExpressionStringNoThe regular expression used to select the word for redaction

IRedactionResults

This represents a collection of IRedactionResult objects.

IRedactionResults Methods


IUserMetaData

This represents a set of user information for a batch.

IUserMetaData Properties

NameTypeEditableDescription
UserNameStringNoThe user ID
EmailStringNoThe user's email address
FirstNameStringNoThe user's first name
LastNameStringNoThe user's last name

IWord

This represents a single word on a page.

IWord Properties

NameTypeEditableDescription
BoundsRectangleFNoThe area of the page that contains the word
ConfidenceDoubleNoThe OCR confidence
TextStringNoThe text of the word

On this page:

Related Pages: