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 town.
To run this script:
- Copy the script below, or click here to download the BAS file: Create Street Map by Town.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_Town.bas ' Copyright (C) Golden Software Inc. 1992-2015 ' ' Starts MapViewer and creates a street map of certain towns. ' ' 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 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
Updated July 2, 2018
Comments
0 comments
Please sign in to leave a comment.