'---------Creation Information----------------- ' 'Name: createtab 'Author: Cindy How 'Date: 1/22/97 'Revisions: '1. 1/29/97 by Cindy How ' -added default drop height ' -enable changing defaults '2. 6/17/96 by Cindy How ' -enable user to click on a branch ' where a drop exists (split into two scripts: ' apply and click events). ' '---------------------------------------------- '------------Purpose/Description--------------- '---------------------------------------------- ' 'This program will create a table called drops.dbf. 'It is to be used as the click event with the 'script DROPDATA as a apply event. ' '----------------------------------------------- '-------------------Input----------------------- '----------------------------------------------- ' '1. Theme inodes.shp '2. Attribute table of inodes.shp '3. Theme ibranch.shp '4. Attribute table of ibranch.shp ' '----------------------------------------------- '------------------Output----------------------- '----------------------------------------------- ' '1. Empty table called drops.dbf ' '----------------------------------------------- '---------Getting initial data------------------ '----------------------------------------------- theProject=av.getProject TabName="drops.dbf".AsFilename NewTable=VTab.MakeNew(TabName,dBase) '----------------------------------------------- '-------Adding Fields to the New Table---------- '----------------------------------------------- NFld=Field.make("Node",#Field_long,8,0) BFld=Field.make("Branch",#Field_long,8,0) HFld=Field.make("Height",#Field_decimal,10,4) TFld=Field.make("Tailwater",#Field_decimal,10,4) NewTable.AddFields({NFld,BFld,HFld,TFld}) 'Add Table TheTab = Table.Make(NewTable) TheTab.SetName("drops.dbf") MsgBox.Info("Click on each branch where a drop occurs. When done, move on.","User Input")