|
POST
|
Yeah the ArcMap doc had a little selector box on each page that let you view the page for previous software release versions, but I don't see that in Pro. I'm not sure why. Your code looks fine, so I don't know why it's not working. You could try route_name instead of layer_object in the AddLocations input. That should also work.
... View more
08-06-2020
12:54 PM
|
1
|
1
|
6440
|
|
POST
|
I think you're running into a known issue that we fixed in the ArcGIS Pro 2.6 release. We saw this behavior when trying to add travel modes to an old network dataset. If you open the network dataset properties to the General tab and expand the Summary section, I'm guessing you will see that the dataset version is 9.3 or something like that (ie, not 10.1, which is the latest version for network datasets). You have two options to work around this problem: 1) Install ArcGIS Pro 2.6 (I saw from your other post that you said you're using 2.5). The problem should be gone in 2.6. 2) Use the Upgrade Dataset geoprocessing tool to upgrade the network to the latest dataset version. I think this will also fix the problem. Let me know if neither of those options resolves the issue.
... View more
08-06-2020
12:36 PM
|
1
|
1
|
1662
|
|
POST
|
Okay, no problem. I will answer your question about how to get the path to the Routes sublayer in this thread, and I'll answer your travel mode question on your other post. From what you've said, you don't actually need the feature dataset path specifically. You just need to retrieve the Routes sublayer of the Route layer and save it out to another feature class, right? Check out the last code sample (called "MakeRouteAnalysisLayer example 4") on this documentation page: Make Route Analysis Layer (Network Analyst)—ArcGIS Pro | Documentation I think that demonstrates exactly what you're trying to do. Essentially you need to use the .listLayers() command on the Route layer object to retrieve the Routes sublayer object, and you can use that as input to other geoprocessing tools, like CopyFeatures.
... View more
08-06-2020
12:28 PM
|
0
|
2
|
2237
|
|
POST
|
Can you clarify your workflow? Are you doing this in python? What do you intend to do with the feature dataset (this may help me to answer in a way that is more useful to you)?
... View more
08-06-2020
08:12 AM
|
0
|
4
|
2237
|
|
POST
|
Yes, you can put your network dataset in your Enterprise Geodatabase, then set the network data source to point to that network dataset. However, I don't think that would make the analysis any faster.
... View more
08-03-2020
02:59 PM
|
1
|
1
|
2934
|
|
POST
|
The time_zone_for_time_fields parameter was just added at ArcGIS Pro 2.6, so if you have not updated to 2.6 yet, that's probably the source of the error. You can just leave out the last "" in your call to MakeRouteAnalysisLayer.
... View more
08-03-2020
11:54 AM
|
0
|
3
|
6440
|
|
POST
|
If you don't need M values, you can ignore this message. M values are used primarily for linear referencing when you need to know the distance along a line that a point falls.
... View more
07-31-2020
01:49 PM
|
1
|
8
|
2934
|
|
POST
|
You can set the number of facilities to find to some number >= the number of cities you have. Then you will get a route from each city to each other city.
... View more
07-31-2020
12:16 PM
|
0
|
0
|
4468
|
|
POST
|
Did you get an error message? An incorrect result? If you give me some details, I might be able to help.
... View more
07-31-2020
08:16 AM
|
0
|
0
|
4468
|
|
POST
|
Yes, all of the Network Analyst solvers can work with the same network dataset.
... View more
07-31-2020
07:55 AM
|
0
|
2
|
4468
|
|
POST
|
Although the OD Cost Matrix tool shows straight lines connecting origins and destinations, the it calculates the network distance or travel time and reports those values in the output table. The straight lines are intended only for visualization, like a spider diagram. If you need to use the output of a network analysis to determine which countries the route goes through, you cannot use the OD Cost Matrix tool. OD Cost Matrix only reports the travel time or distance and not the actual route. You should instead use either the Route solver or the Closest Facility solver, depending on the way your problem is set up.
... View more
07-30-2020
04:59 PM
|
1
|
4
|
4468
|
|
POST
|
Yes, that's definitely possible. What you want is the Sequence field in the output Stops. This page lists the field available in the outputs: Route output data types—ArcGIS Pro | Documentation One way to access that field is to use the export() method to save the output Stops to a feature class and then use it the same way you would any feature class. But if you just want to get the sequence values, you can use searchCursor() to access them directly: result = route.solve()
fields = ['Name', 'RouteName', 'Sequence']
for row in result.searchCursor(arcpy.nax.RouteOutputDataType.Stops, fields):
print(row) Here is the documentation for searchCursor: SolverResultSearchCursor—ArcGIS Pro | Documentation
... View more
07-29-2020
08:04 AM
|
0
|
5
|
6440
|
|
POST
|
Don't give up yet! You just have a capitalization error, and the code is case sensitive. It's "Type", not "type" in "RouteInputDataType". RouteInputDataType—ArcGIS Pro | Documentation
... View more
07-28-2020
12:05 PM
|
1
|
7
|
6440
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 06-12-2026 01:53 PM | |
| 1 | 04-21-2026 08:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|