SetLegendMask Method

Indicates which legend items to show in the GeneralDataSet Object or RealTimeSPCDataSet object.

Syntax

object.SetLegendMasklngMask

Properties

The SetLegendMask method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

lngMask

A value that represents the Legend items to show in the data set:
LegendMaskSourceName (1)
LegendMaskDescription (2)
LegendMaskCurrentValue(4)
LegendMaskLowLimit (8)
LegendMaskHighLimit (16)
LegendMaskAvgOverRange (32)
LegendMaskLowOverRange (64)
LegendMaskHighOverRange (128)
LegendMaskQuality (256)

NOTE: In order to use the lngMask enumerations, you must add the type library file for object to the references of the VBA project. If the type library file is not included in the references, then only numerical values are accepted. The type libraries for objects in the Applied To list are as follows:
 

Object

Reference

Type Library File Name

GeneralDataSet

iFIX GeneralDataSet Object v1.0 Type Library

FixGeneralDataSetDll.tlb

RealTimeSPCDataSet

iFIX SPCRealTimeDataSet Object v1.0 Type Library

FixSPCRealTimeDataSetDll.tlb

Remarks

Calling this method is functionally equivalent to setting the LegendMask property. However, if the type library is included in the project references, VBA's IntelliSense will display a user-friendly list of legend mask symbols while you are typing in the VBA Code Window, and there is no need to memorize or look up for numerical values of the legend mask.

For example, if you are combining multiple mask values using the bitwise OR operation, such as

object.SetLegendMask LegendMask HighLimit | LegendMask LowLimit

and you want VBA IntelliSens to display the list repeatedly, you need only to type the vertical bar (the OR operator) before the first mask value, move the cursor before it, and invoke the menu item by pressing Ctrl + Shit + J.

Example

Applies To