Select to view content in your preferred language

Get alias name of featureclass

792
4
10-19-2022 12:44 PM
Vidar
by
Occasional Contributor II

This should be simple, however I can't seem to find how you can get the alias name of a featureclass. I am going though the layers in the TOC, I think they are FeatureLayer type when you are looping, but no obvious way to find the alias.

 

 

 

 

0 Kudos
4 Replies
Aashis
by Esri Contributor
Esri Contributor
0 Kudos
Vidar
by
Occasional Contributor II

Is there something similar for rasters too?

0 Kudos
happygis
New Contributor II

Is there some function like SetAliasName()

0 Kudos
Aashis
by Esri Contributor
Esri Contributor

@happygis, You can set/change the alias name using the SchemaBuilder Modify method from the Pro SDK 3. x.

 

 

SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);        
FeatureClassDescription description = new FeatureClassDescription(featureClass.GetDefinition());
description.AliasName = "Your-FC-AliasName";
        
schemaBuilder.Modify(description);
bool status = schemaBuilder.Build();

 

0 Kudos