proc GetTrafficItemByName { trafficItemName } { # Search for the exact Traffic Item name and return the Traffic Item object" foreach trafficItem [ixNet getList [ixNet getRoot]traffic trafficItem] { set currentTiName [ixNet getAttribute $trafficItem -name] if {[regexp "(TI\[0-9]+)?$trafficItemName$" $currentTiName]} { return $trafficItem } } # Retuning 0 if not found return 0 }