Skip to main content

Rail AutoRouter Functions

Functions

HRESULT _PCRSFN PCRSClearAutoRouter(Trip trip)


HRESULT _PCRSFN PCRSAddAutoRouteOrig(Trip trip, char *geoName, char *geoChar, char *rrIn)

  • geoName: placeName or geocode
  • geoChar: City, SPLC, FSAC, ERPC, or Rule260
  • rrIn: railroad SCAC (e.g. ‘BNSF’, ‘UP’, etc)

HRESULT _PCRSFN PCRSAddAutoRouteDest(Trip trip, char *geoName, char *geoChar, char *rrIn)

  • geoName: placeName or geocode
  • geoChar: City, SPLC, FSAC, ERPC, or Rule260
  • rrIn: railroad SCAC (e.g. ‘CSXT’, ‘NS’, etc)

HRESULT _PCRSFN PCRSAddAutoRouteVia(Trip trip, char *geoName, char *geoChar)

  • geoName: placeName or geocode
  • geoChar: City, SPLC, FSAC, ERPC, or Rule260

HRESULT _PCRSFN PCRSCalcAutoRoutes(Trip trip, int *numAutoRoutes)

  • numAutoRoutes: pointer argument into which total number of successfully calculated routes will be placed

HRESULT _PCRSFN PCRSGetNumAutoRoutes(Trip trip, int *numAutoRoutes)

  • numAutoRoutes: pointer argument into which total number of successfully calculated routes will be placed

HRESULT _PCRSFN PCRSGetAutoRouteLine(Trip trip, char *buffer, int bufSize, int which, int *pNumJcts)

  • buffer: character buffer into which message (route description) will be placed
  • bufSize: maximum number of bytes that can be copied into buffer
  • which: index number of desired route (Note: first route is value 0)
  • pNumJcts: number of railroad junctions in selected route

HRESULT _PCRSFN PCRSGetAutoRouteMiles(Trip trip, int which, long *pMiles)

  • pMiles: pointer into which calculated trip distance will be placed (in tenths of miles/kms)

HRESULT _PCRSFN PCRSGetNumARLegs(Trip trip, int arIndx, int *numLegs)

  • arIndx: AutoRoute index number
  • numLegs: number of legs from a given auto-route

HRESULT _PCRSFN PCRSGetARLegInfo(Trip trip, int arIndx, int which, short *rrNum, long *miles, char *rule260)

  • arIndx: AutoRoute index number
  • which: leg index number
  • rrNum: RR number
  • miles: leg miles in tenths
  • rule260: junction name
Last updated July 19, 2025.