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

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Aug 1, 2013 at 22:36

1 Answer 1

1

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

arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", '!FIRST_PLNA!', "PYTHON_9.3");
answered Aug 1, 2013 at 22:48
1
  • @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. Commented Aug 1, 2013 at 22:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.