s26761

Problem with generating directions

Discussion created by s26761 on Nov 20, 2013
Hello

Since upgrading from ArcMap Desktop 10.0 to ArcMap 10.2, I've encountered a problem with generating directions as per the error message shown below.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80045026): Solve required prior to generating directions.
   at ESRI.ArcGIS.NetworkAnalyst.INAStreetDirectionsAgent.Execute(ISet set, ITrackCancel TrackCancel)


And I've tracked the above error to the following code, i.e.

        Dim streetDirectionsAgent = DirectCast(pContext.Agents.ItemByName("StreetDirectionsAgent"), ESRI.ArcGIS.NetworkAnalyst.INAStreetDirectionsAgent)
        streetDirectionsAgent.Execute(routesSet, Nothing)

Any clue as to what maybe the cause? Any workaround?

Thanks.

Rgds
Ong CF

Outcomes