1

I have a point layer; the attribute table includes x and y coordinates of original centroids associated with the points (the points were generated from the perimeters of circle features and still carry centroid data).

Since each layer contains points from two different polygons, individual point in each layer have different centroid values. I need to update the attribute table so that each row has the same value; conveniently, for each layer the desired value is from the first row (i.e. FID=1).

I'm working in ModelBuilder, so ideally this would be a model-friendly solution.

Is there an easy fix that I'm blanking on?

Possibly something in the field calculator?

enter image description here

  • 2
    Welcome to the site James. Do you use Python, or are you committed to ModelBuilder? – Aaron May 10 '15 at 22:33
  • 2
    I'm with Aaron. This is a very easy python but really not easy in model builder. As a python script you can create a tool and use it in an existing model.. how does that sound to you? – Michael Stimson May 10 '15 at 22:45
1

In a model, this is just a combination of Calculate Value and Calculate Field.

Model with Calculate Value and Calculate Field

Use a bit of Python code/cursors in Calculate Value to pull out the first value from the data source. If your data elements are different in your model, adjust the use of '%Feature Class%' and '%Field Name%' as appropriate.

Calculate Value

And then hook that up to Calculate Field. With Calculate Field make sure to right-click on the tool and make the Field Name parameter a variable. Calculate Field

Note: I'm just showing for a single field

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.