long PCMSGetAFMsgBytes(char *pSetName, char *pBuffer, long bufSize)


char *pSetName – The name of the avoid/favor set to package up into a RouteSync message. You may only specify one name in this string. Optionally, you can pass in NULL. In that case, all sets contained in the Avoid/Favor Manager are packaged up.

char *pBuffer – An empty byte array that Connect will attempt to put the RouteSync message into.

long bufSize – The amount of memory allocated for pBuffer.


Creates a RouteSync message to send avoid/favor data from a PC*MILER client to a CoPilot Truck client. (Licenses for RouteSync and the Streets add-on are required.) You may want to use this for the special case where you do not want to manage the driver or route but would like the driver to avoid a road.

Return Values 

Returns a long value indicating the length in bytes of the message stored in pBuffer. If pBuffer was allocated but did not contain enough space to hold the entire message, it will return -1. 

Supported Since: PC*MILER Connect 25

Category: RouteSync