1

In AcrMap 10.2 I'm trying to add a field and run this script in Field Calc:

!shape.isMultipart!

to see if I have any multipart lines. I keep getting geoprocessing failures. I am clicking the "python" and "String" buttons. Is there something I'm doing wrong? Maybe my field type is wrong? I've tried double and float.

5

Your syntax is correct. However, yes, your data type for the field you are calculating to is incorrect. The function returns a Boolean string, TRUE or FALSE. You need to have a text field you are calculating on/into.

This is explained in the specific error message you are getting. View it by going to Geoprocessing > Results, and expanding Current Session, the specific event/process resulting in the error, and then the Messages section.

Note that the number/string/date radio buttons in the Field Calculator merely control the functions shown in the right box for you to select from. They don't affect the calculation in any way.

1

I calced !Shape.isMultipart! to a Text field and it filled it with 'TRUE' and 'FALSE'. The output type is string, not numeric, so only a Text field will work.

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.