EKL - Report2D - Get crossed Zones

Retreive Zone crossed by LineID or Cable 

  • Retrieve all Zones crossed by a route and write them in the route instance attribute
    • Parameters.GetAttributeObject ("List_Zone_Names")
    • Parameters.SetAttributeObject("List_Space_Ref_Names", List)
/* Rule created by BG2 2/12/2018 */ 

let ListZoneCrossedByRoute(LIST)
let ListZoneNames(LIST)
set ListZoneNames = Parameters.GetAttributeObject ("List_Zone_Names")
set ListZoneCrossedByRoute = Parameters.GetAttributeObject ("List_Zone_Names_Along_Route")

if(ListZoneCrossedByRoute.Size() > 0)
{
    let sDescription(string)
    set sDescription=""
    let ThisInstance (RFLVPMLogicalInstance)
    set ThisInstance = ThisObject.Instance
     if(ThisInstance <> NULL)
    {
        ThisInstance.SetAttributeString("V_description", sDescription)
    }
    
                let ListSpaceRefNames(LIST)
                let ListTempZones(LIST)
                for ListTempZones inside ListZoneCrossedByRoute
                {                               
                                let sZoneName(STRING)
                                if(ListTempZones.Size() > 0)
                                {
                                                sZoneName = ListTempZones.GetItem(1)
                                                ListSpaceRefNames.Append(sZoneName)
                                }                 
    
        sDescription = sDescription + "{"
        for sZoneName inside ListTempZones
        {
            sDescription = sDescription + sZoneName
            sDescription =  sDescription + " "
        }
        sDescription = sDescription + "}, "
                }               
                ListSpaceRefNames.RemoveDuplicates()         
                Parameters.SetAttributeObject("List_Space_Ref_Names", ListSpaceRefNames)
                
               if(ThisInstance <> NULL)
    {
        ThisInstance.SetAttributeString("V_description", sDescription)
               }
}
else if(ListZoneNames.Size() > 0)
{
                Parameters.SetAttributeObject("SpaceRefString", ListZoneNames.GetItem(1))
}