<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Service area: setting impedance in model builder? in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/service-area-setting-impedance-in-model-builder/m-p/1606060#M9014</link>
    <description>&lt;P&gt;The below is the ArcMap UI for setting impedance in a service area layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AZendel_0-1744727449937.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130236i4EE18F2BE0EF2B79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AZendel_0-1744727449937.png" alt="AZendel_0-1744727449937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to set this in model builder?&lt;/P&gt;&lt;P&gt;Our county's central GIS office set up our network dataset and I can't change it. It includes attributes (fields) such as FT_COST, FT_SPEED, FT_MINUTES. FT_COST and FT_MINUTES are the same for most street segment - they both represent time costs. I need service areas based on distance (feet or miles), but model builder seems to keep defaulting FT_COST or FT_MINUTES. If I change the impedance in Pro to "CostLength feet" in the above screenshot, I get the expected results. One way streets and overpasses (F_ZLEV, T_ZLEV) are respected as well.&lt;/P&gt;&lt;P&gt;But I want to use model builder so we don't have to go through all of these steps manually. But I can't find a place to set the impedance to distance/length. Is this possible in model builder?&lt;/P&gt;&lt;P&gt;I also tried exporting the model to python and then adding a travel mode:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    #new_travel_mode = arcpy.na.TravelMode(travel_modes["Driving Distance"])
    new_travel_mode = arcpy.na.TravelMode()
    new_travel_mode.impedance = "Feet"

    # Process: Make Service Area Analysis Layer (Make Service Area Analysis Layer) (na)
    Service_Area2 = arcpy.na.MakeServiceAreaAnalysisLayer(network_data_source=TRANSROUTING_ND, layer_name="Service Area2", travel_mode=new_travel_mode, travel_direction="FROM_FACILITIES", cutoffs=[2], time_of_day="", time_zone="LOCAL_TIME_AT_LOCATIONS", output_type="LINES", polygon_detail="STANDARD", geometry_at_overlaps="OVERLAP", geometry_at_cutoffs="RINGS", polygon_trim_distance="100 Meters", exclude_sources_from_polygon_generation=[], accumulate_attributes=["CostLength"], ignore_invalid_locations="HALT")[0]&lt;/LI-CODE&gt;&lt;P&gt;But line 6 bugs out with this error:&amp;nbsp;&lt;SPAN&gt;ERROR 030232: Invalid travel mode value: "The travel mode refers to an impedance attribute that does not exist.''&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using Pro version 3.0.3. We can't upgrade due to incompatibilities with our county's ArcGIS Server Version.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for any insight that you can provide!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Apr 2025 15:33:35 GMT</pubDate>
    <dc:creator>AZendel</dc:creator>
    <dc:date>2025-04-15T15:33:35Z</dc:date>
    <item>
      <title>Service area: setting impedance in model builder?</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/service-area-setting-impedance-in-model-builder/m-p/1606060#M9014</link>
      <description>&lt;P&gt;The below is the ArcMap UI for setting impedance in a service area layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AZendel_0-1744727449937.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130236i4EE18F2BE0EF2B79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AZendel_0-1744727449937.png" alt="AZendel_0-1744727449937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to set this in model builder?&lt;/P&gt;&lt;P&gt;Our county's central GIS office set up our network dataset and I can't change it. It includes attributes (fields) such as FT_COST, FT_SPEED, FT_MINUTES. FT_COST and FT_MINUTES are the same for most street segment - they both represent time costs. I need service areas based on distance (feet or miles), but model builder seems to keep defaulting FT_COST or FT_MINUTES. If I change the impedance in Pro to "CostLength feet" in the above screenshot, I get the expected results. One way streets and overpasses (F_ZLEV, T_ZLEV) are respected as well.&lt;/P&gt;&lt;P&gt;But I want to use model builder so we don't have to go through all of these steps manually. But I can't find a place to set the impedance to distance/length. Is this possible in model builder?&lt;/P&gt;&lt;P&gt;I also tried exporting the model to python and then adding a travel mode:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    #new_travel_mode = arcpy.na.TravelMode(travel_modes["Driving Distance"])
    new_travel_mode = arcpy.na.TravelMode()
    new_travel_mode.impedance = "Feet"

    # Process: Make Service Area Analysis Layer (Make Service Area Analysis Layer) (na)
    Service_Area2 = arcpy.na.MakeServiceAreaAnalysisLayer(network_data_source=TRANSROUTING_ND, layer_name="Service Area2", travel_mode=new_travel_mode, travel_direction="FROM_FACILITIES", cutoffs=[2], time_of_day="", time_zone="LOCAL_TIME_AT_LOCATIONS", output_type="LINES", polygon_detail="STANDARD", geometry_at_overlaps="OVERLAP", geometry_at_cutoffs="RINGS", polygon_trim_distance="100 Meters", exclude_sources_from_polygon_generation=[], accumulate_attributes=["CostLength"], ignore_invalid_locations="HALT")[0]&lt;/LI-CODE&gt;&lt;P&gt;But line 6 bugs out with this error:&amp;nbsp;&lt;SPAN&gt;ERROR 030232: Invalid travel mode value: "The travel mode refers to an impedance attribute that does not exist.''&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using Pro version 3.0.3. We can't upgrade due to incompatibilities with our county's ArcGIS Server Version.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for any insight that you can provide!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 15:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/service-area-setting-impedance-in-model-builder/m-p/1606060#M9014</guid>
      <dc:creator>AZendel</dc:creator>
      <dc:date>2025-04-15T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Service area: setting impedance in model builder?</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/service-area-setting-impedance-in-model-builder/m-p/1606088#M9015</link>
      <description>&lt;P&gt;As you've discovered, there's no way to use a custom travel mode in a model.&amp;nbsp; You can only use travel modes that are stored permanently on the network data source.&lt;/P&gt;&lt;P&gt;Your Python script isn't working because "Feet" isn't the name of one of the impedance attributes on the network.&amp;nbsp; From your screenshot, it looks like the attribute is named "CostLength".&amp;nbsp; The "Feet" you have highlighted in the screenshot is the unit of measurement used by the attribute.&amp;nbsp; It's just there for informational purposes.&lt;/P&gt;&lt;P&gt;Here's the documentation for how to construct a custom travel mode object in Python:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/travelmode-nax.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/travelmode-nax.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You're on the right track.&lt;/P&gt;&lt;P&gt;new_travel_mode = arcpy.na.TravelMode(travel_modes["Driving Distance"])&lt;BR /&gt;new_travel_mode.impedance = "CostLength"&lt;/P&gt;&lt;P&gt;If you're planning to use Python to automate your workflow, check out this page for a better alternative than using the MakeServiceAreaAnalysisLayer geoprocessing tool: &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/performing-network-analysis.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/performing-network-analysis.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 15:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/service-area-setting-impedance-in-model-builder/m-p/1606088#M9015</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2025-04-15T15:52:08Z</dc:date>
    </item>
  </channel>
</rss>

