Hi everyone. I'm new to Mappoint and have just added MP routing to an application I am developing. I have successfully created the ptm file but when I try to open it from my app, I get "The file does not exist in the specified location". I know the path is correct and that the file is there. I'm running the app from the VS.NET IDE. Here's the code that saves and opens the file:
If sPtmFile = "" Then
iTemp = Int((1000000 * Rnd()) + 1)
sPtmFile = Trim(Application.StartupPath) & "\TempMaps\TempMap" & CStr(iTemp) & ".ptm"
If sOpenWith = "Mappoint" Then
oApp.ActiveMap.Saved = True
The error occurs when the SysProc funtion attemps to start MP and open the file. I've checked the value of sPtmFile a hundred times and I know it's correct. I can also find the file in Windows Explorer and dblclick it to open it with MP, or open MP and do File->Open on it, so I know there's nothing wrong with the file. Any help you can give me I would appreciate.