KB no longer maintained - MapViewer is a Legacy Product. Legacy Products are still supported, but no longer receive new features or updates. Many of MapViewer's features have been moved to Surfer. Please contact support@goldensoftware.com with any questions. |
This article contains a sample script for creating a street map for a specific zip code.
To run this script:
- Copy the script below, or click here to download the BAS file: Create Street Map by ZIP.BAS
- In a Windows Explorer window, navigate to C:\Program Files\Golden Software\MapViewer 8\Scripter.
- Double click on Scripter.exe to launch Scripter.
- Press Ctrl+A to select all of the existing lines then press Delete.
- If you copied this script, press Ctrl+V to paste it into Scripter. If you downloaded it, click File | Open, select the BAS file from your downloads directory, and click Open.
- Click Script | Run to run the script.
*********
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Create_Street_Map_by_ZIP.bas ' Copyright (C) Golden Software Inc. 1992-2015 ' ' Starts MapViewer And creates a street map of certain ZIP codes. ' ' This script uses the STR files that are available here: http://public.goldensoftware.com.s3.amazonaws.com/index.html?prefix=boundary_mv7/STRStreetFiles/. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Main Dim mvApp, plot, stmap As Object Dim zips(1) As Variant ' Initializes and opens MapViewer Set mvApp = CreateObject("MapViewer.Application") mvApp.Visible = True Set plot = mvApp.Documents.Add(DocType:=mvDocPlot) ' Create street map of ZIP 80525 and 80526 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 zips(0) = "80525" zips(1) = "80526" plot.CreateStreetMap ( StreetFileName := "C:\GSI_Street_Data\CO\08069.STR", _ Append := True, IDIndexForPID := 1, IDIndexForSID := 0, IDIndexForAtt1 := 5, _ IDIndexForAtt2 := 6, IDIndexForHyperlink := 0, Subset := True, _ pZIPOrTownNames := zips, SpecifyTown := False ) End Sub
Updated July 02, 2018
Comments
0 comments
Please sign in to leave a comment.