Order of equipment hierarchy

Is there a way to determine the order of equipment as it appears in the equipment hierarchy on the alarm page etc?  Having it in alphabetical order is often not the best / most logical order (eg for flow of the plant or for production systems first and aux second)

Parents
  • Hi Stuart,

    I take you are using a Workspace based project (SA_Include)?

    Well it is possible, but not out of the box. Unfortunately to do so requires modification of the SA_Include project.

    On startup, your equipment model is loaded into a "menu". Menu's as you may know support an "order" property.

    Loading of the equipment occurs in function " _Equipment_LoadTask" of [SA_Include]EquipmentModel.ci.
    In this function you will see 3 calls to "MenuNodeAddChild". If you change those calls to specify the optional order parameter (6th param) then you have a way to specify the order the nodes will be displayed in.

    Of course, that means you also need somewhere to specify the order of the equipment. You could do that as part of a custom field in your equipment table. You can then modify the same function above with:

    Change:
    hSession = Equipment_OpenBrowseSession(sEquipmentFilter, "Cluster,Name,Type,Alias,Page,Content,Area,Custom1");

    Add to the other field reads:

    nOrder = StrToInt(EquipBrowseGetField(hSession, "Custom1"));


    and then update all the MenuNodeAddChild to pass in nOrder as the 6th parameter.


    All Equipment trees within the workspace will then respect that order.

  • Thanks Bradley.  I thought I vaguely recalled that it was available somewhere or perhaps was going to be there in a future release, but when I was there was no specific field for it, I guessed not.  We will probably give it a go, for one of our favorite customers.

  • Pity we can't overload the function somehow in our own project.  It doesn't seem to have many dependencies.

Reply Children
  • That would be nice wouldn't it. Would also be nice if equipment had some form of order property as well. It is probably a stretch we would implement it Stuart, especially in any timeframe you are looking at. At this stage your best option is maintaining a copy of your own SA_Include. We rarely make changes to the include projects in patches at least, so maintenance at that angle is hopefully manageable.