<SPAN class="pln" style="color: black;">So I need to create a line based on a series of points. In the example below, there are 4 lines to be created, Line_1. Line_2, etc. Struggling with the loop that creates each pointList.</SPAN>
cursor = arcpy.da.InsertCursor(fc, ["Name","SHAPE@"])
for ln in inputFile:
name = ln[0]
pointList = Point. Array() # initial Array
ln = line.split(",") # Split the lines in text file
point = arcpy.Point(ln[1], ln[2]) # Create points
pointList.add(point) # Add points to array
polyline = arcpy.Polyline(pointList)
cursor.insertRow(name, polyline)<SPAN class="typ" style="color: #2b91af;">Line_1</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">529018.125025</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4108038.05548</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_1</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">529005.718792</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4108028.20659</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_1</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528993.340503</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4108018.73931</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_1</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528980.990158</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4108009.65364</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_1</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528968.667757</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4108000.94958</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_2</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528956.373301</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107992.62713</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_2</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528944.106788</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107984.68629</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_2</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528931.86822</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107977.12705</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_3</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528919.657595</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107969.94943</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_3</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528907.474915</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107963.15341</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_3</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528895.320179</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107956.739</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_3</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528883.193387</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107950.7062</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_4</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528871.09454</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107945.055</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_4</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528859.023636</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107939.78542</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_4</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528846.980676</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107934.89744</SPAN><SPAN class="pln" style="color: black;"><BR /></SPAN><SPAN class="typ" style="color: #2b91af;">Line_4</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">528834.965661</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> </SPAN><SPAN class="lit" style="color: maroon;">4107930.39107</SPAN>