GefObjectEvents.GetContextMenuItem (method)

Gets the GefObjectEvent for the context menu iten events.
Syntax: Set GefObjectEvent = object.GetContextMenuItem ( MenuItemText, Create )
Parameters:
MenuItemText As String -
Optional Create As Boolean - If specified as True, an event of this type will be created if one does not already exist. The default is False.
Description: The GetContextMenuItem gets or creates a ContextMenuItem event.

Example:

Sub GefObjectEvents_GetDialogClose()
    
    Dim oCimObj As GefObject
    Dim oCimObjEvnts As GefObjectEvents
    Dim oCimObjEvnt As GefObjectEvent
    
    Set oCimObj = CimGetObject
    Set oCimObjEvnts = oCimObj.Events
    Set oCimObjEvnt = oCimObjEvnts.GetContextMenuItem("Ack Alarm")
    If Not oCimObjEvnt Is Nothing Then
        MsgBox "The action name is " & oCimObjEvnt.ActionName
    Else
        MsgBox "No ContextMenuItem event with menu text (Ack Alarm) is configured for this object"
    End If
    
End Sub