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){
   // ...
}

26.03.2024 13:49:49

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.