PDA

View Full Version : Recognizing PTM file version



Yuri Rubinov
08-30-2011, 11:39 AM
I apply Mappoint Automation for a long period of time, and for clients/users sharing ptm files with my applications. And I did not have problems for now since all of them use one MapPoint version (2006)

Now, some of the users consider switching to newer Mappoint version 2011. The problem is that 2011 version cannot work with files created in version 2006 without converting them, and when converted, 2006 version cannot open ptm file anymore.

When my applications try to open ptm 2006 file using automation in 2011, then the conversion goes automatically and without any warnings. Even worse, depending on the complexity of the map the conversion may take sufficient time and user remain unaware of the process, application looks frozen, etc.

I will appreciate your input and recommendations on how to deal with such problems.

As a minimum, I would like to learn how to recognize ptm file format prior to open it in mappoint. For instance, if reviewed in the editor, is there any key letter combination in ptm file that could serve as an indicator of the file version?

Thank you in advance


Yuri Rubinov

Eric Frost
08-31-2011, 11:25 AM
I opened a few files in a hex editor, and I noticed a few lines down the files have a path to the template folder... this has the version number (e.g. 17 or 18 ) in the folder name. Maybe you could tell that way?

Eric

Yuri Rubinov
08-31-2011, 01:42 PM
Thank you for the reply.
I doubt it is a reliable approach. Name for folder with templates, it may differ from mappoint default directory on particular machines. Also, I quess, while installing Mappoint, user may chose to create a custom folder for it.

Yuri Rubinov

Eric Frost
08-31-2011, 09:19 PM
The template folder goes into a system-defined place and the user cannot over-ride it. Certainly there must be a simple way, as MapPoint.exe itself seems to identify whether the version is below, at, or above the exe instance very quickly.

Eric