' MakeIDScript ' Makes a unique ID ' It was written by Timothy S. Thomas. ' Editing began on 12/7/99, and was last edited on 12/7/99. theProject = av.GetProject theView = av.GetActiveDoc theThemeList = theView.GetActiveThemes theTheme = theThemeList.Get(0) theFTab = theTheme.GetFTab numRecs = theFTab.GetNumRecords theFTab.SetEditable(True) newName = MsgBox.Input("Name of new ID","New name","NewID") idField = Field.Make(newName,#FIELD_LONG,8,0) theFTab.AddFields({idField}) ' Shows message in message bar av.ShowMsg("Creating unique id field") for each rec in theFTab theFTab.SetValue(idField,rec,rec+1) av.SetStatus(100*(rec+1)/numRecs) end ' Clears message in message bar av.ClearMsg ' Refresh updates the in-memory version of the FTab theFTab.Refresh theFTab.SetEditable(False)