Hi,
Based on this post I am dynamically creating GIS routes, which I know I'm probably not supposed to do :-)
The route update seems to work fine: in the attached GIS_demo.fsm the GetGISDuration user command synchronously waits for the route update, if needed, then returns the duration of the trip between A and B.
The problem in this model seems to be when I try to send a Task Executer down the newly executed path. To reproduce:
- Call InitializeGISPoints to create some new points on the map.
- Reset and Run the model.
- You'll get an exception the first time a token enters the Travel task.
- Note that the TravelTime label, which is the requested duration, is shown correctly.
- Reset and Run again.
- You'll notice that this time, the TE correctly travels down the indicated path.
- The same exception now happens for the second leg, which did not exist yet.
- When run again, all previously seen paths will work correctly but new ones do not.
I'm hoping there's a simple event function I can call to fix this... please help? :-)