Community of VE/MapPoint Users and Developers
This is a discussion on MapPoint to Gif Programatically within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am creating a series of gif files based upon location information that I feed to Map Point. I use ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MapPoint to Gif Programatically It goes something like this: objMapApp = new mappoint.application objMap = Find(some criteria) objMap.SaveAs(htmlpath,saveashtml) objImage = Image.fromFile(imagepath & "image_map.gif") objMapApp.quite objMapApp = nothing This works fine until I repeat the process... then nothing can touch that image file (no system.io operations, no MapPoint.SaveAs) Any thoughts? |
| ||||
|
Have you ruled out this FromFile Method part of the code? Code: objImage = Image.fromFile(imagepath & "image_map.gif")
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
| Yes, I have.
Right now, I'm getting around it by generating a random file name for each new html I create. And everything is being created correctly. But I still can't clean up the files until I leave my application. Somewhere, something in MapPoint isn't being cleaned up correctly, but I think my code cleans everything possible. But either I am wrong, or the mere reference to MapPoint creates some type of wrapper that runs along with my application, or I have no idea what is going on. Smile. |
| |||
| Doingit in VB.NET
If you want to do it in VB.NET you might run in to trouble (as I did), so here's what you do there: Add a class to your project (remember to add a reference to stdole): Code: Public Class ConvertImage
Inherits System.Windows.Forms.AxHost
Public Sub New()
MyBase.New("59EE46BA-677D-4d20-BF10-8D8067CB8B33")
End Sub
Public Shared Function ImageToIPicture(ByVal Image As System.Drawing.Image) As stdole.IPictureDisp
ImageToIPicture = GetIPictureFromPicture(Image)
End Function
Public Shared Function IPictureToImage(ByVal Image As stdole.IPictureDisp) As System.Drawing.Image
IPictureToImage = GetPictureFromIPicture(Image)
End Function
End Class
Code: Picture1.Image = ConvertImage.IPictureToImage(mpUtil.GetPictureFromObject(mpApp.ActiveMap)) |
![]() |
| Tags |
| gif, mappoint, programatically |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rotate map programatically in MapPoint 2006 | Banu | MapPoint 2006/2009 Discussion | 0 | 05-04-2006 05:46 PM |
| Ctrl+T (Data -> Territories...) programatically MapPoint | SheepWorrier | MapPoint 2006/2009 Discussion | 3 | 04-12-2005 05:34 PM |
| Can MapPoint programatically add a place (not a pushpin)? | Anonymous | MapPoint 2006/2009 Discussion | 0 | 11-11-2003 11:39 AM |
| Error in programatically drawing radius rings in mappoint | Eamon | MapPoint 2006/2009 Discussion | 1 | 01-02-2003 06:39 PM |
| Is MapPoint capable of programatically returning a.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-18-2002 05:27 AM |