AnsweredAssumed Answered

error 000582 - FlipLine_Edit

Question asked by thanos_cp78 on Oct 7, 2015
Latest reply on Oct 8, 2015 by GSCUser85
def CreateBiDirectionalRoute(input_lines, _routes):
            try:
                in_geo = [i for i in arcpy.da.SearchCursor(input_lines, ['ID', 'SHAPE@', 'SPEEDLIMIT'])]
                incur = arcpy.da.InsertCursor(nztm_routes, ['ROUTENAME', 'ROUTENUM', 'JOINFIELD', 'SHAPE@', 'SPEEDLIMIT'])
                for _geo in in_geo:
                    incur.insertRow([_geo[0], 'A', str(_geo[0])+'-'+'A', _geo[1].projectAs(arcpy.SpatialReference(###), ###), _geo[2]])
                flip_features = arcpy.FlipLine_edit(input_lines)
                in_geo2 = [k for k in arcpy.da.SearchCursor(flip_features, ['ID', 'SHAPE@','SPEEDLIMIT'])]
                for _geo2 in in_geo2:
                    incur.insertRow([_geo2[0], 'B', str(_geo2[0])+'-'+'B', _geo2[1].projectAs(arcpy.SpatialReference(###), ###), _geo2[2]])
                del incur
            except arcpy.ExecuteError:
                arcpy.AddMessage(arcpy.GetMessages(2))


 

 

Hi guys,

 

from the above code, if I use a versioned sde featureclass as inputlines, I get the error above based on line 7. Is there a work around to be able to use versioned fcs for this function of mine?

 

Thanks

Outcomes