<?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 Problems Accessing Lines sub-layer of OD Cost Matrix Result in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/problems-accessing-lines-sub-layer-of-od-cost/m-p/163183#M528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am running an accessibility analysis for my thesis work but I am having trouble with accessing the Lines sub-layer after I solve the OD Cost Matrix. I need to be able to work with the Lines sub-layer to move forward in my analysis. I have tried select tool and copy features and it always comes back with an error that the Dataset Lines does not exist or is not supported. Does anyone know a way to fix this? Ideally I would like to export as its own layer or a shapefile. Here is the network analyst part of my code if that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ODMatrix = arcpy.MakeODCostMatrixLayer_na(Network, "Travel","TravelTime", 30)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Get the layer object from the result object. The OD cost matrix layer can &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #now be referenced using the layer object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ODMatrix = ODMatrix.getOutput(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Get the names of all the sublayers within the OD cost matrix layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; subLayerNames = arcpy.na.GetNAClassNames(ODMatrix)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Stores the layer names that we will use later&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; originsLayerName = subLayerNames["Origins"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; destinationsLayerName = subLayerNames["Destinations"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; lines = subLayerNames["ODLines"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Load the census tract locations as origins &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.AddLocations(ODMatrix, originsLayerName, CTPoint)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Load the physician locations as destinations &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.AddLocations(ODMatrix, destinationsLayerName, Physicians)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Solve OD Cost Matrix&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.Solve(ODMatrix)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 18:25:18 GMT</pubDate>
    <dc:creator>AlexTurner</dc:creator>
    <dc:date>2014-02-11T18:25:18Z</dc:date>
    <item>
      <title>Problems Accessing Lines sub-layer of OD Cost Matrix Result</title>
      <link>https://community.esri.com/t5/transportation-questions/problems-accessing-lines-sub-layer-of-od-cost/m-p/163183#M528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am running an accessibility analysis for my thesis work but I am having trouble with accessing the Lines sub-layer after I solve the OD Cost Matrix. I need to be able to work with the Lines sub-layer to move forward in my analysis. I have tried select tool and copy features and it always comes back with an error that the Dataset Lines does not exist or is not supported. Does anyone know a way to fix this? Ideally I would like to export as its own layer or a shapefile. Here is the network analyst part of my code if that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ODMatrix = arcpy.MakeODCostMatrixLayer_na(Network, "Travel","TravelTime", 30)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Get the layer object from the result object. The OD cost matrix layer can &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #now be referenced using the layer object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ODMatrix = ODMatrix.getOutput(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Get the names of all the sublayers within the OD cost matrix layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; subLayerNames = arcpy.na.GetNAClassNames(ODMatrix)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Stores the layer names that we will use later&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; originsLayerName = subLayerNames["Origins"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; destinationsLayerName = subLayerNames["Destinations"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; lines = subLayerNames["ODLines"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Load the census tract locations as origins &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.AddLocations(ODMatrix, originsLayerName, CTPoint)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Load the physician locations as destinations &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.AddLocations(ODMatrix, destinationsLayerName, Physicians)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; #Solve OD Cost Matrix&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.na.Solve(ODMatrix)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 18:25:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/problems-accessing-lines-sub-layer-of-od-cost/m-p/163183#M528</guid>
      <dc:creator>AlexTurner</dc:creator>
      <dc:date>2014-02-11T18:25:18Z</dc:date>
    </item>
  </channel>
</rss>

