This project is read-only.

Another Snapshot3 question

Feb 23, 2011 at 1:34 AM
Edited Feb 24, 2011 at 12:44 AM

I use snapshot3 to print individual parcel plans from a large parcel plan shape file. It works great except I can't seem to be able to create the world file. I have a super with strange tastes who I know will want to import the resulting jpg into arcview (already referenced). This is what I use to create the jpg (vba in access):

Private Sub Print_Click()
        Dim image As New MapWinGIS.image
        Dim success As Boolean
        Dim extents As extents
        Set extents = axMap.extents
        Set image = axMap.SnapShot3(extents.xMin - 100#, extents.xMax + 100#, extents.yMax + 100#, extents.yMin - 100#, 2000)
        success = image.Save("C:\Legacy.jpg", True, MapWinGIS.ImageType.JPEG_FILE)
        Shell "rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen C:\Legacy.jpg"

End Sub
I have tried using USE_FILE_EXTENSION as type but with the same result. On another note, I make the shape I put into the image in memory using "" instead of a filename. 
I suppose I should do that with the jpg. 
Does anyone know how I could call it using the Picture & Fax viewer like above? I tried "" but it just looked back at me :( 
What I do is print to PDF from the viewer.
One thing I noticed is that it does make a world file. However it doesn't give it a name, just .jpgw and puts it on the Desktop\My Documents folder. I definately would prefer the jgw but it really isn't that important
Feb 28, 2011 at 4:03 PM

Hi mikmyro,

To my knowledge it does not produce a world file at all. But it would be really simple to do so in your own code. Look in wikipedia for the definition of a world file. You can then modify your own code to save it to the same folder as the jpg file.

Brian M.