Facility Control

 View Only

Ultrix destination locaking / unlocking best practice

  • 1.  Ultrix destination locaking / unlocking best practice

    Posted 08-25-2025 07:55

    Question: Is it necessary to lock destinations before making a route?

    Assuming the answer is yes or at least good practice, I am a little confused by the commands.

    Looking at the code generated by the visual editor:

    When locking destinations:

    var panelid = ogscript.getString("UltrixGroupPB" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var levString = "1,2,3" + "";
    var levels = levString.split(",");         
    var multi1 = params.createMultiSet("UltrixGroupPB");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i < levels.length; i++) {
       multi1.setValue('params.statusByDestination.' + (58 - 1) + '.lockowner',levels[i] - 1,panelid);
       multi1.setValue('params.statusByDestination.' + (58 - 1) + '.lockstatus',levels[i] - 1,2);
    }
    multi1.execute();

    line 8 seems to set the owner for the destination 1, level 1.  Then it goes on to set the owner and lock status for the actual destinations and levels.
    Why is it setting the owner of destination 1?

    When clearing the lock:

    var panelid = ogscript.getString("UltrixGroupPB" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var levString = "1,2,3" + "";
    var levels = levString.split(",");         
    var multi1 = params.createMultiSet("UltrixGroupPB");
    for (i = 0; i < levels.length; i++) {
       multi1.setValue('params.statusByDestination.' + (58 - 1) + '.lockowner',levels[i] - 1,panelid);
       multi1.setValue('params.statusByDestination.' + (58 - 1) + '.lockstatus',levels[i] - 1,0);
    }
    multi1.execute();

    It does not do anything to dest 1 level 1, does not clear the owner of the specified destinations.
    It only clears the lock status!

    Do I need to clear lock owner?



    ------------------------------
    Richard Hills
    ------------------------------