Alarm Summary Object Set Unit Filter via VBA

Hi,

I have multiple non-batch units that I am using a single graphic on by using TagGroup files.  One element on the graphic is an Alarm Summary object that is to have its filter set to the current unit being viewed.  The filter does not allow you to enter a replaceable object like you do with the TagGroup items and I am unable to figure out how to address the filter settings via VBA.

Has anyone done this type of thing before?

I am using DeltaV 12.3.1.

Thank you,

Dave

  • Hi,
    I have a alarm summary page that the operator can dynamically filter (using buttons) to one of the Unit Modules used to contain the third party packages. I think this is similar to what you would like to do.

    1/ In the Alarm Summary configuration on the Filter tab Set to "Only Alarms from" and set "Units/Equipment Modules". There may be a way of setting this through VBA but I did not find it so far.

    2/ Configure the VBA code to set the unit modules you are interested in. I used the existing Sub called "SetAlmContext" the code for this sub is available on the AlarmsList.grf if this code is not on your graphic.
    example to set two equipment modules as the filtered equipment modules SetAlmSumContext "EquipArea_A,EquipArea_B"

    That is all that is required, a comma separated list of unit modules.
    Maybe you could use a tag substitution in the sub CfixPicture_Initialise()
    add this line:
    SetAlmSumContext "@UnitEquip@"

    Hope this helps.
  • In reply to Chris:

    Hi Chris,

    This was exactly what I needed!

    The steps I needed to take to make this work exactly right was to:
    1. On the filter tab of the alarm summary object, configure it for EMOD/Unit and make sure the "Use Current Context" check box was marked.
    2. On the load of my graphic, assign the Unit(s) that I wanted it to filter by in VBA by simply writing to the DVAlarmSummary.CurrentContext property.

    Thanks!