joaquil0

Additionnal fields in TXT file created (Python script 10.1)

Discussion created by joaquil0 on Sep 28, 2012
Latest reply on Oct 2, 2012 by joaquil0
Hi all,

I am currently working on a 10.1 Python script that aims at creating a new TXT file with fields, and at writing values in those       fields.
To create the TXT file and the fields, I use the following syntax, which works correctly:

outputFile = open(outputFileName,'w')
outputFile.write("Field1,Field2,Field3,PointID,Field5 " + "\n")

Then I want to write values with the following syntax:

(loop)
outputFile.write(str(Field1Value) + "," + str(Field2Value) + "," + str(Field3Value) + "," + str(pointIDValue) + "," +                     str(Field5Value) "\n")
(end loop)

This works correctly, except that I have two additional fields that I would not expect.
Field1, Field2, Field3, PointID and Field5 are created, filled up with the correct values, but two fields called PointID_X and            PointID_Y are created with nonsensical values inside.

NotePAD, WordPAD, NotePAD++ do not see these additional fields in the TXT fields. ArcGIS 9.3.x does not. ArcGIS 10.1 does

Can someone help me?

Thank you for your help.

Outcomes