The GetFirstSectionName Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
Gets the name of the first section in currently opened user dictionary.Visual Basic (Declaration) | |
---|---|
Function GetFirstSectionName() As String |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As IOcrUserDictionary Dim value As String value = instance.GetFirstSectionName() |
C# | |
---|---|
string GetFirstSectionName() |
C++/CLI | |
---|---|
String^ GetFirstSectionName(); |
Return Value
The name of the first section in the currently opened user dictionary or null (Nothing in Visual Basic) if no more sections are found.The user dictionary must be opened with Open or Create before you can use this method.
Refer to IOcrUserDictionary example on how to use this method to iterate the user dictionary sections.
A user dictionary typically consists of different sections, the sections may contain one or more specified items (IOcrUserDictionaryItem). You can enumerate the sections in the User dictionary with the GetFirstSectionName and GetNextSectionName methods.
Each zone can be linked to a section in the User dictionary using the OcrZone.UserDictionarySectionName property.
User dictionary items are strings and they must be no longer than MaximumItemLength characters. They may contain spaces and punctuation characters.
If there is no default section specified, in the methods that expects a defaultSectionName parameter, the first section of the User dictionary will be the default.
You can set the current user dictionary to use in the checking subsystem with the Use method. If no user dictionary has been set, no checking through the user dictionary will be performed.
You can use the Create method to create a new user dictionary and the Open method to open for edit an existing dictionary. You can then iterate through the sections and items as well as adding new sections and items to the dictionary. When you are done, you must call Save to save any changes you made to the dictionary and finally Close to close it.
Note: This property is not supported in the LEADTOOLS OCR Advantage Engine and it will always return null since sections are not supported for this engine.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7