I think I have a solution! I ve checked the following code and it works.
1) This example creates a Point Feature of the Vertices of your line with the help of Numpy Arrays (Numpy Needs to be installed)
2) Then it merges These Vertices as Points together with your 'points' on the line
-> Theres one drawback: On the Output Pointfile of this merge you Need to create a new field and sort the Points in the right order (1-9 in this example)
Otherwise the final line would look like a 'grinding by numbers' (but Ive found also examples to automate this too..
3) Finally a new line is created including the original line and the Points on the line
Feel free to ask me, in case you've got questions or some parts of the code dont work on your system
import arcpy, numpy, os
sr = arcpy.SpatialReference(25832)
### The Input: Your Points on the line (PointsLTW) // The line feature itself (InFcLine)
PointsLTW = r"C:\lineVerts\PointsLTW.shp"
InFcLine = r"C:\\lineVerts\LineLTW.shp" # input feature class
OutFcLine = r"C:\lineVerts\LineLTW_out2.shp" # output feature class
print "Inputs accepted.."
# Creates a Point Array of your Line
arrayLine = arcpy.da.FeatureClassToNumPyArray(InFcLine,["SHAPE@XY"], "", sr, explode_to_points=True)
print "Numpy Array created.."
# ..in case no Array was created
if arrayLine.size == 0:
arcpy.AddError(InFcLine + " contains no features!")
# From Array to Point Feature of your Input Line
else:
arcpy.da.NumPyArrayToFeatureClass(arrayLine, OutFcLine, ['SHAPE@XY'], sr)
print "New Multipoint Feature (LineToVertPoints) from Numpy Array.."
# Now you just merge your original PointsLTW with your original Line, now written as a Point Feature out of the lines Vertices
arcpy.Merge_management(inputs="PointsLTW;LineLTW_out2",output="C:/lineVerts/FinalPointsxx.shp",field_mappings="""Id "Id" true true false 6 Long 0 6 ,First,#,PointsLTW,Id,-1,-1,LineLTW_out2,Id,-1,-1""")
# Finally you create a line out of the merged points, the only drawback is that you need the Points to be sorted after the line Direction (From East to West or VV), I did this with a new field sorting the points by hand
arcpy.PointsToLine_management(r"C:/lineVerts/FinalPointsxx.shp" , r"D:\FinalLinexx.shp", "","sortedLTW")
