Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

How to save map as *.ptm programmatically in MapPoint?

This is a discussion on How to save map as *.ptm programmatically in MapPoint? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, Anyone knows how to save the current map in an embedded MapPoint as TOleContainer as a ptm file? I ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to save map as *.ptm programmatically in MapPoint?

    Hi,

    Anyone knows how to save the current map in an embedded MapPoint as TOleContainer as a ptm file?

    I tried the following without success:

    //
    fMapPointApp.ActiveMap.Saved := False;
    fMapPointApp.ActiveMap.SaveAs('Saved_Map_F.ptm', geoFormatMap, False);
    //


    Are these any properties I need to set to make it work? Or am I doing it all wrong?

    Thanks,

    /jean-phi
    enosant<ignore_this_part>@hotmail.com

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Not sure if this is the fix but try it. Let us know if it works or not.

    //
    fMapPointApp.ActiveMap.SaveAs('Saved_Map_F.ptm', 0, False);
    //

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    How to save map as *.ptm programmatically in MapPoint?

    This is the same as what I was doing I'm afraid, since in the type library geoFormatMap hs this definition:

    //
    Const
    geoFormatMap = 0;

    I really want to save as a map (that can be reopened and edited) and not HTML or JPEG which is what all other posts seem to be referring to.

    Thanks,

    /jean-phi
    enosant<ignore_this_part>@hotmail.com

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Hi Jean-phi,

    I don't have any experience automating MapPoint from a TOleContainer. Is this the MapPoint control?

    Check the help file, it looks like SaveAs is "Not available for embedded maps or the MapPoint Control."


    It looks like there's two difference methods for saving from the control -

    SaveMap Method
    "Saves the specified map or template. If the map was opened from a template, then the map is saved as "Map.ptm" in the "My Documents" directory."
    Private Sub cmdSave_Click()
    MappointControl1.SaveMap
    End Sub

    SaveMapAs method
    "Saves the specified map or template."
    Private Sub cmdSaveAs_Click()
    MappointControl1.SaveMapAs App.Path & "\NewMap.ptm"
    End Sub

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. programmatically create a field for a MapPoint.Dataset?
    By citrix_99301 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-18-2006, 04:27 AM
  2. Can I save Mappoint files as .est so they can be read by ST
    By selfstorage in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-14-2005, 02:09 PM
  3. Drawing scribble on mappoint programmatically
    By vidyakulkarni in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-29-2004, 09:06 PM
  4. How to programmatically connect to MapPoint Extranet
    By Owen in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-09-2003, 05:23 PM
  5. Is it possible to save a MapPoint file in a form r....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-09-2002, 11:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27