How can I edit name of lines of layer in ArcMap from Visual Studio C#? E.g., change STR_NAME = "Pushkin street" to STREET = "Pushkin street"?

  • I'm not sure I understand your question, what is STR_NAME AND STREET (are these database column names for changing a definition query)? What do you mean by "lines of layer"? – artwork21 Oct 15 '14 at 12:04
  • If you're editing data or fields, then it's the feature class you're editing, not the layer. The layer simply points to the source data. As M.D. said below, you'll have to create a new field, copy the data, and delete the old one. – pvdev Oct 15 '14 at 15:39
  • For example, I created an add-in, a custom tool which only operates with exact layer. But it has no idea, how layer and its db columns will be named. So I desided create a options class and window, where user can set settings. Maybe renaming fields in database is a little overhead, but I research all variants. – James Tomatov Oct 16 '14 at 3:04

If you are trying to rename the field STR_NAME to STREET, ArcObjects does not allow you to do that. You will have to create the field STREET, copy the data from STR_NAME into it, then delete STR_NAME.

| improve this answer | |

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.