English

How To: Add X and Y components of coverage labelpoint feature class to fields in the attribute table

Summary

Use the Field Calculator to populate X and Y data fields with the X and Y components of a coverage labelpoint feature.

Procedure

  1. Create a number field and name it X_Value.
    1. Open the table and select Start Editing from the Table menu.
    2. Select Add Field from the Edit menu.
    3. In the Field Definition dialog box:
      1. Set Name to an appropriate name, for example 'Area'.
      2. Set Type to Number.
      3. Set Width to an appropriate number, for example '32'.
      4. Set Decimal Places to the desired number, for example '6'.
      5. Click OK.
    4. Select Stop Editing from the Table menu and save the edits.
  2. Create another number field, name it Y_Value.
  3. Select Start Edting from the Table menu, if not already in edit mode.
  4. Make the X_Value field active.
  5. Select Field Calculator from the Table menu.
  6. Enter the following code in the expression box of the Field Calculator.
    Code:
    [shape].aslist.get(0).getx 
  7. Click OK.
  8. Make the Y_Value field active.
  9. Select Field Calculator from the Table menu.
  10. Enter the following code in the expression box of the Field Calculator.
    Code:
    [shape].aslist.get(0).gety