IClassSchemaEdit修改要素类信息

时间:2023-12-29 20:57:14
private void ChangeFeatureClassAliasName(IFeatureClass pFeatureClass, string aliasName)
{ ISchemaLock schemaLock = pFeatureClass as ISchemaLock; try
{
schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock); IClassSchemaEdit classSchemaEdit = pFeatureClass as IClassSchemaEdit; classSchemaEdit.AlterAliasName(aliasName);
}
catch (COMException comExc)
{ throw comExc; }
finally
{
schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);
}
}