The following
Document Review events occur during the document review process if a
customized menu is defined.
Application_BeforeCustomMenuDropDown - Use this event to activate or deactivate a customized menu
command.
This script event is fired often to ensure that you can use it to activate or deactivate the menu. For example, when
documents are loaded by a batch, or when you navigate between documents. As a result, the best practices is to not implement any
message boxes for this event as the message is then displayed any time the event is fired.
Application_CustomMenuClicked - Use this event to define the action that occurs when the operator
selects the menu command.
Selecting the
"Open Image" menu item to display an image in an external viewer.
Private Sub Application_CustomMenuClicked(ByVal MenuName As String, ByRef pXFolder As CASCADELib.CscXFolder, ByVal DocIndex As Long, ByVal PageIndex As Long, ByVal bDocSelected As Boolean, ByRef bMustRefreshUI As Boolean)
'if "Open Image" menu item is selected then open the selected image in external viewer
If MenuName = "Open Image" Then
If (PageIndex > -1) And (DocIndex > -1) Then
OpenImage( pXFolder.DocInfos(DocIndex).ImageFilename(PageIndex))
End If
End If
End Sub
'This function displays the file provided in the imgpath parameter with associated viewer
Function OpenImage(ByVal imgpath As String)
Dim objShell
objShell = CreateObject("Shell.Application")
objShell.ShellExecute(imgpath, "", "", "open", 1)
objShell = Nothing
End Function
Private Sub Application_BeforeCustomMenuDropDown(ByVal MenuName As String, ByRef pXFolder As CASCADELib.CscXFolder, ByVal DocIndex As Long, ByVal PageIndex As Long, ByRef bDisableMenuItem As Boolean)
'if no document or page is selected then disable "Open Image" menu item
If MenuName = "Open Image" Then
If (DocIndex < 0 Or PageIndex < 0) Then
bDisableMenuItem = True
End If
End If
End Sub
' Project script
Private Sub Application_CustomMenuClicked(ByVal MenuName As String, _
ByRef pXFolder As CASCADELib.CscXFolder, ByVal DocIndex As Long, _
ByVal PageIndex As Long, ByVal bDocSelected As Boolean, _
ByRef bMustRefreshUI As Boolean)
' If Reclassifiy NewClass1 is applied for a selected document
' the class is changed and the document is refreshed
' on the GUI, new class name is shown and
' confidence is set to Reclassified
If DocIndex < 0 Then Exit Sub
Select Case MenuName
Case "Reclassify NewClass1"
pXFolder.DocInfos.ItemByIndex(DocIndex).XDocument.Reclassify("NewClass1")
Case "Reclassify NewClass2"
pXFolder.DocInfos.ItemByIndex(DocIndex).XDocument.Reclassify("NewClass2")
End Select
bMustRefreshUI = True
End Sub
Search results
Search tips
The search returns topics that contain terms you enter. If you type more than one term, an OR is assumed, which returns topics where any of the terms are found. Enclose your search terms in quotes for exact-phrase matching.
The search also uses fuzzy matching to account for partial words (such as install and installs). The results appear in order of relevance, based on how many search terms occur per topic. Exact matches are highlighted.
To refine the search, you can use the following operators:
Type + in front of words that must be included in the search or - in front of words to exclude. (Example: user +shortcut –group finds shortcut and user shortcut, but not group or user group.)
Use * as a wildcard for missing characters. The wildcard can be used anywhere in a search term. (Example: inst* finds installation and instructions.)
Type title: at the beginning of the search phrase to look only for topic titles. (Example: title:configuration finds the topic titled “Changing the software configuration.”)
For multi-term searches, you can specify a priority for terms in your search. Follow the term with ^ and a positive number that indicates the weight given that term. A higher number indicates more weight. (Example: shortcut^10 group gives shortcut 10 times the weight as group.)
To use fuzzy searching to account for misspellings, follow the term with ~ and a positive number for the number of corrections to be made. (Example: port~1 matches fort, post, or potr, and other instances where one correction leads to a match.)
Note that operators cannot be used as search terms: + - * : ~ ^ ' "