Custom routing preferences, such as avoiding or favoring certain roads or overriding road restrictions, can be set in the PC*MILER user interface and applied to routes generated via PC*MILER|Connect.

The PCMSSetCustomMode function can be used to enable or disable custom routing programmatically.

Alternatively, custom preferences can be activated or deactivated using the “CustomRoute” setting in the PCMSERVE.INI file. When set to TRUE, avoided, favored, and overridden roads set in PC*MILER will be used. The default is FALSE. 


Once custom routing is activated, you can use the following PC*MILER|Connect functions to avoid, favor or override roads:

  • PCMSAFActivateSet activates or deactivates a specific Avoid/Favor set created and named in the PC*MILER user interface.
  • PCMSAFActivateRegion activates or deactivates the default Avoid/Favor set for a specific region.
  • PCMSAFExportSet exports detailed information for a specific Avoid/Favor set out to a delimited text file.
  • PCMSAFExportRegion exports detailed information for the default Avoid/Favor set for a specific region to a text file.