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.

Reply
  • 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.

Children