PC*MILER Connect includes functions that can pull information from specific legs of a route. To use the following functions, check that the compiler’s option for data alignment is set to byte alignment.

  • PCMSNumLegs returns the number of calculated legs in a trip.
  • PCMSGetLegInfo gets the leg information in a trip, including time, cost and distance.


Sample code to retrieve leg information

int legNum;
int i;
struct legInfoType plegInfo;
int numLegs = PCMSGetNumLegs();
for(i=0; i < numLegs; i++)
  PCMSGetLegInfo(trip, legNum, &pLegInfo);