'---------------------------------------------- '---------Creation Information----------------- '---------------------------------------------- ' 'Name: oselbr 'Author: Cindy How 'Date: 6/97 ' '---------------------------------------------- '------------Purpose/Description--------------- '---------------------------------------------- ' 'This script will take select the branch to be 'editted. It is to be used as the apply event 'with OBRTAB. ' '----------------------------------------------- '-------------------Input----------------------- '----------------------------------------------- ' '1. "obrtab.dbf" file ' '----------------------------------------------- '------------------Output----------------------- '----------------------------------------------- ' '1. Selected record ' '----------------------------------------------- '---------Get Initial Information--------------- '----------------------------------------------- TheProject = av.GetProject TheView = av.GetActiveDoc TheTheme = TheView.FindTheme("obranch.shp") TheTabName = av.GetProject.FindDoc("obrtab.dbf") TheTab = TheTabName.GetVtab DiamFld = Thetab.Findfield("Diameter") SlopeFld = Thetab.FindField("Slope") TheTab.SetEditable(true) NewPt = TheView.GetDisplay.ReturnUserPoint PtOnTheme = Thetheme.FindByPoint(NewPt) If (PtOnTheme.isEmpty) then Msgbox.error("That point is not found, try again","Not found") exit end rec=PtOnTheme.get(0) OldDia = TheTab.ReturnValue(DiamFld,rec) OldSlope = TheTab.ReturnValue(SlopeFld,rec) labels = {"Diameter (m)","Slope"} defaults = {OldDia.AsString,OldSlope.AsString} NewValList = msgbox.multiInput("Enter the branch characteristics","New Values",labels,defaults) test = NewValList.Count If (test > 0) then NewDiam = NewValList.get(0).AsNumber NewSlope = NewValList.Get(1).AsNumber TheTab.SetValue(DiamFld,rec,NewDiam) TheTab.SetValue(SlopeFld,rec,NewSlope) else end TheTab.SetEditable(false)