'---------------------------------------------- '---------Creation Information----------------- '---------------------------------------------- ' 'Name: osortpt 'Author: Cindy How 'Date: 6/25/97 ' '---------------------------------------------- '------------Purpose/Description--------------- '---------------------------------------------- ' 'This script will number the points which 'are not terminal nodes or are terminal nodes 'with direct inflow. These are the nodes which 'should be numbered under the naUTilus numbering 'system ' 'This script should be run after the scripts 'JUNCTION and INFLNODE have been applied. ' 'FOR USE ON OSBL UNITS ' '----------------------------------------------- '-------------------Input----------------------- '----------------------------------------------- ' '1. Node theme - onode.shp '2. Attribute table for the theme nodes ' - field "Node_Type" ' - field "Node" (empty) ' '----------------------------------------------- '------------------Output----------------------- '----------------------------------------------- ' '1. naUTilus node numbers in the "Node" field ' '----------------------------------------------- '---------Get Initial Information--------------- '----------------------------------------------- TheProject = av.GetProject TheView = av.GetActiveDoc TheTheme= TheView.FindTheme("Onode.shp") TheFtab = TheTheme.GetFtab TheField = TheFtab.FindField("Onodes") TypeFld = TheFtab.FindField("Node_Type") NodeFld = TheFtab.FindField("Node") TheFtab.SetEditable(True) k = 1 for each rec in TheFtab type = TheFtab.ReturnValue(TypeFld,rec) if (type = -1) then elseif (type = 2) then TheFtab.SetValue(NodeFld,rec,-1) else TheFtab.SetValue(NodeFld,rec,k) k=k+1 end end