Using Enumerations

Some properties of context objects may be of type enum. To check the value of such a property, you need to compare it with the corresponding enum member.

JScript and VBScript

All enumeration members are accessible as named numerical constants in the global scope. For example:

// Automatic Indexing script (JScript)
if(this.Attributes(0).Type == DAT_SingleLine){
   // ...
}

.NET

An enumeration member can be accessed by the name of the corresponding type. For example:

// Automatic Indexing script (C#)
if(doc.Attributes[0].Type == DocumentAttributeType.DAT_SingleLine){
   // ...
}

20.09.2022 9:27:51

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.