Batch prompt pop up configuration using script


I want to set filtering of Batch unacknowledged prompts based on Units. Can anybody help me how we can set the option shown in attachment using script? This option will be set in edit mode of graphics.

This will be a dynamo. Unit name will be available on dynamo form. 

Thanks in advance. Quick response is highly appreciated.

Thanks and BR


  • In reply to Mantri_Bhushan:

    We use this current context all the time, you just add the suggested logic below the DVBCtrlPromptsListX.ConnectControl logic in the DVBCtrlPromptsListX_OnConnectedToAccess() Event

        DVBCtrlPromptsListX.CurrentContext = ps_UnitName4.CurrentValue.Caption

    Then we also have connection logic on the button to show the prompts list to connect again in case it isn't:

        If DVBCtrlPromptsListX.ConnectionState <> "CONNECTED" Then
            On Error Resume Next 'Resume if batch executive is not running
        End If

        If DVBCtrlPromptsListX.ConnectionState = "CONNECTED" Then
            DVBCtrlPromptsListX.CurrentContext = ps_UnitName4.CurrentValue
            If DVBCtrlPromptsListX.ExecutiveNode = "" Then
                Dim BatchExecutive As String
                BatchExecutive = frsReadValue("DVSYS.THISUSER/BATCH_SERVER.A_CV")
                If BatchExecutive <> "" Then
                    DVBCtrlPromptsListX.ExecutiveNode = BatchExecutive
                    DVBCtrlPromptsListX.ConnectControl (30000)
                    MsgBox "Batch Executive Not Defined for this NODE"
                End If
            End If
            MsgBox "Communication with Batch Executive Server failed.", vbCritical
        End If

    where DVBCtrlPromptsListX is the ActiveX Prompts object name and ps_UnitName4 is named in above comment