Changing travel attributes of a network dataset with Python

163
0
01-31-2023 08:54 AM
Labels (2)
HeleneDONNAT
New Contributor

Hi, 

I am trying to create network datasets using Python. I managed to generate the network using this command:

Network = arcpy.na.CreateNetworkDataset(feature_dataset=Dataset_prep_2_, out_name="Network" + name + "_wo", source_feature_class_names=[network], elevation_model="NO_ELEVATION")[0]

Now I'd like to change the properties of the network so I can set the travel attributes along the network to equal travel time. Currently, the only way I know how to do this is to right-click on the network dataset, go to travel attributes, add a new attribute and set the field script to !minutes! (minutes is the variable that contains travel times along each segment of the network). 

As I have about 200 network datasets to go through, doing it manually is not very practical. I wonder if there is a way to do this in Python. 

Thanks for your help. 

0 Kudos
0 Replies