(For PC*MILER Web Services Spreadsheets)


=MilesWS returns the mileage between two points (origin to the destination). The origin and destination may be entered as a city with a state abbreviation (e.g. Paris, TX), a city/state and address, a ZIP/Postal code, SPLC, latitude/longitude point, or a custom place created in ContentTools. (Applicable licensing applies for certain types of data.)


Syntax

=MilesWS (origin, destination, routetype, dims, units, LCV, dataversion, traffic, hazmats, highwayonly)


Examples

=MilesWS("08540;1 independence way","10001;238 west 31st street","prac","162,102,53,80000,5","english",FALSE,PCM38,FALSE,0,FALSE)


If you want to use some of the non-required arguments, but not all of them, include commas as placeholders for the arguments you are leaving out. 


For example, if you want a practical route between 13090 and 17815 in PC*MILER 38, the syntax would be:


=MilesWS("13090,NY","17815,PA",Prac,,,,PCM38)


A highway only route between Boston and Miami with no hazmats would be:


=MilesWS("Boston MA","Miami FL",,,,,,,0,TRUE)


Arguments

ArgumentDescriptionRequired?Values
originThe origin of the trip.yesA geocodable location in the PC*MILER database. Learn more about how to input locations.

Examples:
Princeton, NJ

08540, NJ

M4C 4Y7
40.420833N,74.561111W
new york, ny;118 broadway
191690000
destinationThe destination of the trip.yesA geocodable location in the PC*MILER database. Learn more about how to input locations.
routetypeThe PC*MILER route type to be used in mileage calculations.  Learn more about PC*MILER route types.noPrac (Practical)
Short (Shortest)
Natl (State + National Network)
Toll (Toll Discouraged)*
Air (Air Distance)

or, a combination:

Prac|Natl
Short|Toll


Practical is the Default.
*Requires license for toll data.
dimsThe truck's dimensions.noEnter a number for each dimension in this order: height in inches, width in inches, trailer length in feet, weight in pounds, and number of axles.

Each dimension must be separated by a comma. Leave a blank between two commas if you want to enter some values but not all.

Examples:
162,96,53,80000,8
162,,53,,8
unitsThe units of measurement used in the dims argument.noEnglish (Default)
Metric
LCVIndicates whether the truck is a multi-trailer or longer combination vehicle.noTrue
False (Default)
dataversionThe data version to be used in mileage calculations. (For users licensed for multiple data versions.)noEnter PCM plus the version number:
The range is PCM18 to PCMXX (Current Version) 
Current version is default
trafficIndicates whether or not use traffic data.
(For users licensed for traffic data.)
noTrue
False (Default)
hazmats A list of the hazmat categories that should be applied to the routes created for mileage calculations.no

0 = None (Default)

1 = General

2 = Caustic

3 = Explosives

4 = Flammable

5 = Inhalants

6 = Radioactive

7 = HarmfulToWater

8 = Tunnel

(Separate by commas to pass more than one category in this argument.)
highwayonlyCalculates routes using an air distance from the midpoint of the truck-usable highway segment that is nearest to the destination postal code or city/state.noTrue
False (Default)