'GET THE DRG TABLE AND MAKE A VTAB
theTable = "C:\GIS\Colorado\DRG\quads1.dbf".AsFileName
theVTab = Vtab.Make(theTable, false, false)
'GET THE FIELDS AND ASSOCIATED VALUE LISTS
theNameField = theVTab.FindField("Quadname")
theFileField = theVTab.FindField("Quadpath")
theList = {}
for each rec in theVTab
theName = theVTab.ReturnValueString(theNameField,rec)
theList.Add(theName)
end
'GET THE VIEW
theView = av.GetActiveDoc
'PROMPT THE USER FOR THE DESIRED QUAD
theQuad = Msgbox.ChoiceAsString(theList, "Choose a 7.5 K Quad Map to Display:","Topographic
Quadrangle Maps")
if (theQuad = Nil) then
return nil
end
'SET THE DRG FILENAME
theBitmap = theVTab.GetSelection
theQuery = "[QuadName] = "+theQuad.Quote
theVtab.Query(theQuery, theBitmap,#VTAB_SELTYPE_NEW)
for each rec in theBitmap
theFile = theVtab.ReturnValueString(theFileField,rec)end
'ADD THE DRG TO THE VIEW
theSrcName = SrcName.Make(theFile)
if (theSrcName <> nil) then
theTheme = Theme.Make(theSrcName)
theView.AddTheme(theTheme)
theTheme.SetActive(true)
theTheme.SetVisible(true)
theView.GetDisplay.SetExtent(theTheme.ReturnExtent)
else
msgbox.error("The Quad does not exist","")
return nil
end