You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.

This function is used in Python Scripting.


Send a message to a message handler within the same session.

The Scope Parameter

It is important to be mindful of the scope parameter when calling this function. It is possible to have multiple instances of a view open in a single page, thus invoking the function with a value of "page" for the scope parameter (or omitting the parameter) will invoke the message handlers on all valid message types. This advice is also applicable when the scope parameter is passed "session", as all instances of the matching message type in the whole session will be called.


system.perspective.sendMessage(messageType, payload [, scope, sessionId, pageId])

  • Parameters

String messageType - The message type that will be invoked. Message handlers configured within the project are listening for messages of a specific messageType.

Dictionary payload - A python dictionary representing any parameters that will be passed to the message handler.

String scope - The scope that the message should be delivered to. Valid values are "session", "page", or "view". If omitted, "page" will be used. [optional]

String sessionId - Identifier of the Session to target. If omitted, the current Session will be used automatically. When targeting a different session, then the pageId parameter must be included in the call. [optional]

String pageId - Identifier of the page to target. If omitted, the current page will be used. [optional]

  • Returns


  • Scope

Perspective Session

Code Examples
Code Snippet
# Sends a message to all Message Handlers configured on the current view, indicating that a new item has been added to a list.
system.perspective.sendMessage("NewItem", payload = {"itemName":"banana","itemQuantity":6}, scope = "view")

system perspective sendMessage, perspective.sendMessage

  • No labels