Solved! Go to Solution.
I ran across a need to do this and wrote a script. It only transfers the shape field but could be edited to transfer whatever attributes you want. Set the interval variable to however long you want the output lines to be. Note that there will be a fraction at the end of each line that is less than the interval distance.
## splitLinesAtIntervals.py
## inputs ##
interval = 50 ## units of inFC projection
inFC = r'path\to\inFeatureClass'
outFC = r'path\to\outFeatureClass'
## get to work
import arcpy
arcpy.env.overwriteOutput = True
iCur = arcpy.da.InsertCursor(outFC, ['SHAPE@'])
with arcpy.da.SearchCursor(inFC, ['SHAPE@']) as sCur:
for row in sCur:
lineLength = row[0].length
position = 0
lineGeometry = row[0]
## while length left??
while lineLength > position:
## position point along line at interval
splitPoint = lineGeometry.positionAlongLine(interval)
## split line at point
arcpy.SplitLineAtPoint_management(lineGeometry, splitPoint, 'in_memory/split')
## insert the split line into outFC
with arcpy.da.SearchCursor('in_memory/split', ['OID@', 'SHAPE@']) as splitCur:
for i in splitCur:
if i[0] == 1:
## insert row
iCur.insertRow([i[1]])
else:
lineGeometry = i[1]
position += interval
del iCur