0

I am writing a python script which duplicates a field. The field contains names of pipelines but some of these names has double quotation (ex. 8" NGL PIPELINE). I have created a new field and trying to copy the attributes using:

arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", "'!FIRST_PLNA!'", "PYTHON_9.3");

But the script double quotes whole attributes (ex. "8" NGL PIPELINE"). Is there a way to remove the double quotation marks at the start and end of each attribute?

P.S. I am using ArcGIS version 10.1 Service Pack 5

1

Wouldn't getting rid of the extra quotes work? That is:

arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", '!FIRST_PLNA!', "PYTHON_9.3");
  • @user20688 I just ran same test using your string at ArcGIS 10.2 and it worked fine for me too. As an aside there is no SP5 for 10.1 so I am thinking you must be using ArcGIS Desktop 10.0 SP5 and have adjusted your tags accordingly. – PolyGeo Aug 1 '13 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.