Rename an existing layer

174
1
Jump to solution
01-06-2022 03:56 AM
DavidMrázek
Occasional Contributor II

Hello,

is there a way to rename an existing layer? As soon as I set the path automatically

string file = CoreModule.CurrentProject.DefaultGeodatabasePath;

the program enters the name of the folder where it was saved. I would like to set the name according to myself at a later stage.

Thank you in advance for your reply
David

0 Kudos
1 Solution

Accepted Solutions
GintautasKmieliauskas
Regular Contributor II

Hi,

Use method SetName of Layer object.

layer.SetName("New layer name");

View solution in original post

1 Reply
GintautasKmieliauskas
Regular Contributor II

Hi,

Use method SetName of Layer object.

layer.SetName("New layer name");