Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilderUsing Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
enter image description here

and the Calculate Field enter image description here

I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%

enter image description here

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
enter image description here

and the Calculate Field enter image description here

I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%

enter image description here

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
enter image description here

and the Calculate Field enter image description here

I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%

enter image description here

edited tags
Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 353
added 328 characters in body
Source Link

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this onethis one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description hereenter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
http://gis.stackexchange.com/questions/64562/using-value-from-iterate-feature-selection-to-calculate-field-in-arcmap-10-1-modenter image description here

and the Calculate Field enter image description hereenter image description here

I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%

enter image description here

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
http://gis.stackexchange.com/questions/64562/using-value-from-iterate-feature-selection-to-calculate-field-in-arcmap-10-1-mod

and the Calculate Field enter image description here

I am trying to get the Feature Class name (from Iterate Feature Classes) into a new field. I have been following the models described in the following two threads.

Using Value from Iterate Feature Selection to Calculate Field in ArcMap ModelBuilder

and

this one

However, whenever I run the model I get the following error message

ERROR 000539: Error running expression: CF0140r01 Traceback (most recent call last): File "", line 1, in NameError: name 'CF0140r01' is not defined Failed to execute (Calculate Field)

I have tried it using Parse Path using %Value% in the expression field (here is my model) enter image description here(https://i.sstatic.net/6N5fl.jpg) and I have tried it with the Parse Path tool removed , entering %Name% in the Expression box for Calculate Field

I get the same error message either way


Here are two screen shots of the Feature folder
enter image description here

and the Calculate Field enter image description here

I have tried to simplify this model (not even sure why I need the Feature Class to Feature Class tool, I just have it there because an earlier thread I was using to build this had that in it). Here is the updated, and simplified model, with the Error Message I am getting. FYI: the Expression in the Calculate Field tool is %Name%

enter image description here

appended answer 119371 as supplemental
Source Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 353
Loading
edited tags
Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 353
Loading
Source Link
Loading