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.
ODMatrix = arcpy.MakeODCostMatrixLayer_na(Network, "Travel","TravelTime", 30)
#Get the layer object from the result object. The OD cost matrix layer can
#now be referenced using the layer object.
ODMatrix = ODMatrix.getOutput(0)
#Get the names of all the sublayers within the OD cost matrix layer.
subLayerNames = arcpy.na.GetNAClassNames(ODMatrix)
#Stores the layer names that we will use later
originsLayerName = subLayerNames["Origins"]
destinationsLayerName = subLayerNames["Destinations"]
lines = subLayerNames["ODLines"]
#Load the census tract locations as origins
arcpy.na.AddLocations(ODMatrix, originsLayerName, CTPoint)
#Load the physician locations as destinations
arcpy.na.AddLocations(ODMatrix, destinationsLayerName, Physicians)
#Solve OD Cost Matrix
arcpy.na.Solve(ODMatrix)
ODMatrix = arcpy.MakeODCostMatrixLayer_na(Network, "Travel","TravelTime", 30)
#Get the layer object from the result object. The OD cost matrix layer can
#now be referenced using the layer object.
ODMatrix = ODMatrix.getOutput(0)
#Get the names of all the sublayers within the OD cost matrix layer.
subLayerNames = arcpy.na.GetNAClassNames(ODMatrix)
#Stores the layer names that we will use later
originsLayerName = subLayerNames["Origins"]
destinationsLayerName = subLayerNames["Destinations"]
lines = subLayerNames["ODLines"]
#Load the census tract locations as origins
arcpy.na.AddLocations(ODMatrix, originsLayerName, CTPoint)
#Load the physician locations as destinations
arcpy.na.AddLocations(ODMatrix, destinationsLayerName, Physicians)
#Solve OD Cost Matrix
arcpy.na.Solve(ODMatrix)