I'm trying to set the Alias on a MapProjectItem. The code works and the value is set if I repeat the code in the same Pro session but once I exit Pro and go back in, the Alias is back to null.
IEnumerable<MapProjectItem> mapItems = Project.Current.GetItems<MapProjectItem>();
foreach (MapProjectItem mapItem in mapItems)
{
mapItem.Alias = "DA Test Alias";
}
I'm using Pro 3.0
Solved! Go to Solution.
I was able to duplicate the issue with the Alias property not retaining its value between sessions even when i explicitly save the project. I reported this as an issue to the Framework dev team. Thanks for reporting this issue.
Hi,
I think you need to save project:
await Project.Current.SaveAsync();
I was able to duplicate the issue with the Alias property not retaining its value between sessions even when i explicitly save the project. I reported this as an issue to the Framework dev team. Thanks for reporting this issue.