Thumbnail Image location

2799
1
04-21-2015 09:08 AM
StephenCoppola
New Contributor III

Good Afternoon GeoNet Community,

A questions pertaining to thumbnails:

  1. When a thumbnail is created from a map document (*.mxd), where is this image stored?
  2. How can you access the thumbnail image (via raster and/or vector ) so another application can utilize it?

Thank you for your time and insight.

Tags (2)
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

The thumbnail for the mxd created by File > Map document properties > Make Thumbnail is stored in the MXD itself. If you have file explorer open when you create/delete the thumbnail (then save the mxd) you can see the file size change.

I would be surprised if other applications could access this as it would require those applications to know the internal structure on an MXD.

The following VBA can be run from within the MXD to export it. If you place this in the normal template then you should be able to run this code in all MXD's

Public Sub ExportMXDThumbnail()
    ' Creates a bitmap in c:\temp of the MXD thumbnail
    On Error GoTo eh
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
    Dim pMapDocument As IMapDocument
    Set pMapDocument = pMxDocument
    Dim pPicture As IPicture
    Set pPicture = pmd.Thumbnail
    SavePicture pPicture, "c:\temp\mythumb.bmp"
    Exit Sub
eh:
    MsgBox "No thumbnail to export!"
End Sub
0 Kudos