+ Reply to Thread
Results 1 to 4 of 4

Thread: Insert feature class name into field from iterator in model builder

  1. #1
    John Zastrow
    Join Date
    Jan 2011
    Posts
    8
    Points
    0
    Answers Provided
    0


    0

    Default Insert feature class name into field from iterator in model builder

    in ArcGIS 10 I have a model that iterates over feature classes in a workspace. Each FC table needs to know its own feature class name for text processing later. So, in the model I add a field to the attribute tables and need to write in either the feature class name or the %Name% variable that I use earlier in the model.

    Sticking %Name% into the field calculator throws an error, and using %i% just records an integer. But I need a human readable string.

    Any thoughts?

  2. #2
    Jonathan Quinn

    Join Date
    Dec 2010
    Posts
    512
    Points
    366
    Answers Provided
    54


    0

    Default Re: Insert feature class name into field from iterator in model builder

    I assume you're using the Calculate Field tool to populate the feature class name field? In the Calculate Field tool, use the %Name% in line variable, surrounded by quotes, so "%Name%" and it should work.

    Click image for larger version

Name:	Calculate_Value.png
Views:	159
Size:	106.3 KB
ID:	14083

  3. #3
    John Zastrow
    Join Date
    Jan 2011
    Posts
    8
    Points
    0
    Answers Provided
    0


    0

    Default Re: Insert feature class name into field from iterator in model builder

    Thanks for the reply. I switched over to python so I gave up on MB. But I will try this when I get a moment.

  4. #4

    Join Date
    Jun 2013
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Default Re: Insert feature class name into field from iterator in model builder

    Hi

    It doesn't seem to work for me, as the result is %Name% and not the name of my layer...

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts