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 2 of 2

MappointControl OpenMap filename string length limitation

This is a discussion on MappointControl OpenMap filename string length limitation within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am using the MappointControl on a form in a Visual Basic program and there seems to be a limit ...

  1. #1
    malejo is offline Junior Member White Belt
    Join Date
    Dec 2004
    Location
    Melbourne, Florida
    Posts
    4

    MappointControl OpenMap filename string length limitation

    I am using the MappointControl on a form in a Visual Basic program and there seems to be a limit on the length of the string passed to the OpenMap method. I am using the full path in the string since my ptm file is not in the MapPoint default directory. If the string length <= 126 the map opens correctly; but if the string length is >= 127, then I get the following error in the Visual Basic debugger:

    Run-time error '16385':
    The file "..." cannot be located. Retype the filename and try again.

    The file exists! If I use MapPoint outside the VB program it opens fine. I have carefully debugged this and the only difference is the length of the string passed to OpenMap method. There does not seem to be a way to change the default directory to avoid using the full path. The DefaultFilePath and Path properties of the MapPoint Application and Map objects are both read-only.

    Any comments???

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    max filename len is 255, but they probably wrote a bug in the interface using a signed variable instead of unsigned. so it flows over at >127.

    A workaround is that you uste SUBST to substitute a drive name for the path that you wants to pass. another way is to map a network drive to it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Data Point limitation
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-01-2005, 01:19 PM
  2. InvalidCastException in OpenMap
    By kdulaney in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 02-03-2005, 06:20 PM
  3. 50,000-record limitation
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-06-2004, 11:41 AM
  4. OpenMap in delphi ?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-13-2003, 12:23 PM
  5. I have a need to find a whole length of a road is ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-12-2001, 04:53 AM

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