Skip to main content
Version: 8.1

Perspective - Tag Browse Tree Scripting

This page details the various scripting, component, and extension functions available for Perspective's Tag Browse Tree component.

Component Events​

The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.

onNodeClick​

Fires whenever a node is clicked.

Object PathTypeDescription
event.nameStringThe name of the node that was clicked.
event.pathStringThe Tag path of the node that was clicked.

onNodeDoubleClick​

Fires whenever a node is double-clicked.

Object PathTypeDescription
event.nameStringThe name of the node that was clicked.
event.pathStringThe Tag path of the node that was clicked.

onNodeContextMenu​

Fires whenever a node is right-clicked.

Object PathTypeDescription
event.nameStringThe name of the node that was clicked.
event.pathStringThe Tag path of the node that was clicked.

Component Functions​

This component does not have component functions associated with it.

Extension Functions​

filterBrowseNode​

  • Description

    • Called for each Tag before it is displayed in the Tag Browse Tree. Provides an opportunity to create a complex filter for the Tags in the Tag Browse Tree. filerBrowseNode is best used alongside the Tag Browse Tree's root.path property to specify where the filter should begin filtering. Return False to exclude the Tag from displayed results.
  • Parameters

    • ComponentModelScriptWrapper.SafetyWrapper self - A reference to the component that is invoking this function.
    • NodeBrowseInfo node - The Tag returned as type NodeBrowseInfo. See the Ignition JavaDocs for usage.
  • Return

    • Boolean - The function must return either a True or False.

Example​

filterBrowseNode Example
# This example will filter out any nodes (both Tags and folders included) that do not match the string Ramp.
if node.name == "Ramp":
return True
else:
return False