|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 email@example.com with any questions.|
To import a company logo or any other image onto an existing map, use the Import command, making sure to set AppendImage to False since your logo isn't referenced and thus shouldn't be projected into the coordinate system of the plot.
To run this script:
- Copy the text below, from the Sub main start line to the End Sub end line.
- 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.
- Press Ctrl+V to paste your copied script over top of these existing lines.
- Click Script | Run to run the script.
Set mvApp = CreateObject("MapViewer.Application")
mvApp.Visible = True
'Defines variables to use for the file path and the GSM and logo file names
InPath$ = "C:\Users\<username>\Desktop\MapViewerFiles\"
GSMFileName$ = "HatchMap.gsm"
LogoFileName$ = "Logo.png"
'Creates a new plot window and opens the GSM file there
Set Plot = mvApp.Documents.Open(FileName:=InPath$+GSMFileName$)
'Import image without rescaling the map
Set Layer = Plot.Import(FileName:= InPath$+LogoFileName$, AppendImage:=False)
'Assign the name 'Logo' to the last item imported into the Layer
Set Logo = Layer.Shapes.Item(Layer.Shapes.Count)
'Resize the logo
Logo.Height = 4.00
Logo.Width = 2.00
'Move the logo on the page
Logo.Left = 1
Logo.Top = 5
Updated January 4, 2019