Context

<< Click to Display Table of Contents >>

 

Context

Context(ContextName)

Returns an object implementing the context indicated by the ContextName parameter, which must be a String surrounded by quotation marks. This method fails if no object on the upper hierarchy of the object calling this method implements that context. The following contexts are available:

Container: Server and Viewer objects, that is, objects inserted in project files or on folders inside projects

Area: Alarm Areas, or any server object whose IsAlarmArea property is set to True

Device: Check Valve, Consumer Cluster, Flow Control Valve, Generic Item, Hydraulic Plant, Link Node, One-Terminal Measuring Point, Pipe, Potable Water Consumer Equivalent, Pressure-Reducing Valve, Pressure-Sustaining Valve, Pump, Shutoff Valve, Tank, Throttle Control Valve, Two-Terminal Measuring Point, Water Distribution Network, and Water Supply Point objects

 

In addition, the following specific contexts are available:

Station: Hydraulic Plant object

WaterCheckValve: Check Valve object

WaterConsumerCluster: Consumer Cluster object

WaterConsumerEquivalent: Potable Water Consumer Equivalent object

WaterDistributionNetwork: Water Distribution Network object

WaterFlowControlValve: Flow Control Valve object

WaterGenericItem: Generic Item object

WaterLinkNode: Link Node object

WaterMeasuringPoint: One- and Two-Terminal Measuring Point objects

WaterPipe: Pipe object

WaterPressureReducingValve: Pressure-Reducing Valve object

WaterPressureSustainingValve: Pressure-Sustaining Valve object

WaterPump: Pump object

WaterShutoffValve: Shutoff Valve object

WaterSupplyPoint: Water Supply Point object

WaterTank: Tank object

WaterThrottleControlValve: Throttle Control Valve object

 

NOTE

Context names are case-insensitive. To check the context to which an object belongs, open its Properties Window, select the Item tab, and then check its valid contexts in the Contexts frame. In case an object defines more than one context, their names are presented in alphabetical order, separated by commas.

Was this page useful?