'---------Creation Information----------------- ' 'Name: hardpipe 'Author: Cindy How 'Date: 6/13/97 ' '---------------------------------------------- '------------Purpose/Description--------------- '---------------------------------------------- ' 'This program will create a new table holding the 'information on hard pipe connections. It will have 'fields for the node number, flowrate, temperature, ' concentration, and oil fraction. It is to be 'used with the script "hpsselect". ' '----------------------------------------------- '-------------------Input----------------------- '----------------------------------------------- ' '1. Node theme (inodes.shp) '2. Attribute table of node theme ' '----------------------------------------------- '------------------Output----------------------- '----------------------------------------------- ' '1. New table called hardpipe ' '----------------------------------------------- '---------Getting initial data------------------ '----------------------------------------------- theProject=av.getProject TheView = av.GetActiveDoc TheTheme = TheView.FindTheme("inodes.shp") TheFtab = TheTheme.GetFtab TabName="hardpipe.dbf".AsFilename NewTable=VTab.MakeNew(TabName,dBase) ' '----------------------------------------------- '-------Adding Fields to the New Table---------- '----------------------------------------------- CFld=Field.make("Connect",#Field_long,8,0) FFld=Field.make("Flow_rate",#Field_decimal,8,4) TFld=Field.make("Temp",#Field_decimal,8,2) ConFld = Field.Make("Conc",#Field_decimal,8,4) OilFld = Field.Make("Oil_fraction",#Field_decimal,8,4) NewTable.AddFields({CFld,FFld,TFld,ConFld,OilFld}) '----------------------------------------------- '-----------------Find Fields------------------- '----------------------------------------------- NodeFld = TheFtab.FindField("Node") TypeFld = TheFtab.FindField("Node_Type") TheTab = Table.Make(NewTable) TheTab.SetName("hardpipe.dbf") MsgBox.info("Click on the nodes where hardpipe connections occur. Move on if none exist","User Input")