GefObjectEvents.GetObjectInserted (method)

Gets or creates an object inserted event.
Syntax: Set GefObjectEvent = object.GetObjectInserted ( Create )
Parameters:
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 GetObjectInserted method gets or creates an object inserted event.

Example:

Sub GefObjectEvents_GetObjectInserted()
    
    Dim oCimObj As GefObject
    Dim oCimObjEvnts As GefObjectEvents
    Dim oCimObjEvnt As GefObjectEvent
    
    Set oCimObj = CimGetObject
    Set oCimObjEvnts = oCimObj.Events
    
    Set oCimObjEvnt = oCimObjEvnts.GetObjectInserted
    If Not oCimObjEvnt Is Nothing Then
        MsgBox "The event's action name is " & _
            oCimObjEvnt.ActionName
    Else
        MsgBox "There are no object inserted events configured"
    End If
    
End Sub