' Create_Street_Map_by_Town.bas ' ' This script starts MapViewer and creates a street map of certain towns. ' ' This script requires MapViewer 6 or later. It will not run work ' with MapViewer 5. ' ' Mike Blessing, Golden Software, 29-Jul-2004 ' mapviewersupport@goldensoftware.com ' Option Explicit Sub Main Dim mvApp, plot, stmap As Object Dim towns(1) As Variant ' Start MapViewer and create a pointer to the application object Set mvApp = CreateObject("MapViewer.Application") ' Make the application visible mvApp.Visible = True ' Create a plot document Set plot = mvApp.Documents.Add(DocType:=mvDocPlot) ' Create street map of Loveland and Berthoud in Larimer Co, CO. ' The values for the IDIndexFor* parameters are: ' 0 = empty string ' 1 = street name ' 2 = street type ' 3 = address range for left side of street ' 4 = address range for right side of street ' 5 = zip code for left side of street ' 6 = zip code for right side of street towns(0) = "Loveland" towns(1) = "Berthoud" plot.CreateStreetMap ( _ StreetFileName := "C:\GSI_Street_Data\CO\08069.STR", _ Append := True, _ IDIndexForPID := 1, _ IDIndexForSID := 0, _ IDIndexForAtt1 := 3, _ IDIndexForAtt2 := 4, _ IDIndexForHyperlink := 0, _ Subset := True, _ pZIPOrTownNames := towns, _ SpecifyTown := True _ ) End Sub