I'm working on a macro that uses the Find Nearest tool. The macro works fine when run, but once placed in a workflow, the macro raises the error "Could not load requested Drivetime dataset: Latest".
The macro does not require a drivetime analysis, just a nearest neighbor analysis. Is there any way to fix the macro so that it does not raise this error?
Solved! Go to Solution.
Hi @Philip,
It seemed to work fine when I updated the "Dataset" selection of the this tool within the macro to a valid selection and saved. If "Latest" is the only dataset you have available to select, modify the XML of that tool directly and replace it with the code below. Let me know if you're not sure how to view/edit the XML of a tool.
<Configuration> <Target SpatialObj="SpatialObj" /> <Universe SpatialObj="SpatialObj" /> <HowMany value="1" /> <MaxDistance value="20" /> <MaxDistanceUnits>Miles</MaxDistanceUnits> <Ignore0 value="True" /> <DriveTimeDataSet>Latest:TeleAtlas_US</DriveTimeDataSet> <SelectConfiguration> <Configuration outputConnection="Matched"> <OrderChanged value="False" /> <SelectFields> <SelectField field="Universe_LocationID" selected="True" rename="Universe_LocationID" /> <SelectField field="Universe_SpatialObj" selected="True" rename="Universe_SpatialObj" /> <SelectField field="*Unknown" selected="True" /> </SelectFields> </Configuration> </SelectConfiguration> </Configuration>
Hope this helps!
Thanks @jgo, that got it working.