Select to view content in your preferred language

nax Module addFields Method

354
1
Jump to solution
05-12-2024 12:43 PM
TimSemmelhaack
Occasional Contributor

I Want to add an extra field to the routes layer in a Vehicle Routing Problem Layer created by the nax module. But I can't figure out, what is the right syntax for the field_description.

 

 

vrp.addFields(arcpy.nax.VehicleRoutingProblemInputDataType2.Routes, ["new_field","FLOAT",""])

 

This doesn't work

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

few examples, but a list of lists perhaps

Set analysis inputs—ArcGIS Pro | Documentation

# Add a custom field called NumTrucks to the Service Area Facilities input class
field_definitions = [["NumTrucks", "SHORT"]]
service_area.addFields(arcpy.nax.ServiceAreaInputDataType.Facilities, field_definitions)

... sort of retired...

View solution in original post

1 Reply
DanPatterson
MVP Esteemed Contributor

few examples, but a list of lists perhaps

Set analysis inputs—ArcGIS Pro | Documentation

# Add a custom field called NumTrucks to the Service Area Facilities input class
field_definitions = [["NumTrucks", "SHORT"]]
service_area.addFields(arcpy.nax.ServiceAreaInputDataType.Facilities, field_definitions)

... sort of retired...