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 turning off the visibility for all selected objects in an existing MapViewer plot.
To run this script:
- Copy the script below, or click here to download the BAS file: Hide_Selection.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.
*********
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Hide_Selection.bas ' Copyright (C) Golden Software Inc. 1992-2015 ' ' This script turns off the visibility of all selected objects. ' ' To run this script, first open your MapViewer GSM file and select ' one or more objects, then run this script from Scripter. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Main Dim mvApp, sel As Object Dim i As Long ' Find MapViewer and create a pointer to the application object Set mvApp = GetObject(,"MapViewer.Application") ' Get a pointer to the current selection collection Set sel = mvApp.ActiveDocument.ActiveLayer.Selection ' Set each selected object to be invisible For i = 1 To sel.Count sel.Item(i).Visible = False Next i End Sub
Updated May 22, 2018
Comments
0 comments
Please sign in to leave a comment.