Tag Info

Hot answers tagged


With help from Mark Cederholm I have a working solution using python and arcobjects. It's rough around the edges, but it got the job done. After following the recipe on that page, create a new script which uses the GetLibPath, NewObj, CType, OpenFeatureClass functions from snippets.py. Also create the rename lookup tables in .csv format: Field to Field ...


It should be possible to cast your featurelayer to ITableFields, then loop through each ITableField.FieldInfo and set IFieldInfo.Alias. Last time I checked no error was raised when I assigned more than one field the same alias, so be careful. Update: Field aliases can be confusing. There's an alias for fields that are stored in the database ...


This code works for me in 9.3.1 ... public static void TestAlterAlias(IApplication app) { // make a dictionary of old/new names Dictionary<string, string> nameDict = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase); nameDict.Add("qsectionalias", "qsectionalias2"); nameDict.Add("sursysalias", ...


If the layer implements the IDataLayer interface (most layers do), you can access its IDataLayer.DataSourceName property. For example, for a feature layer, this property will return the FeatureClassName object, which provides various interfaces to examine the data source.


i know that the this post almost closed but i think it's not bad to say my solution. this solution is for user that use SQL server as geodatabase. you can manually change it by an SQL update command. all feature's name save in [sde].[GDB_OBJECTCLASSES] table. the alias name set simply if you change the alias column value . UPDATE ...


Another solution courtesy of Rob Clark: You could use featureclass_to_featureclass with field mapping. Yes it creates another feature class but you could just have an output area to copy data and change aliases whilst it's doing it. In python the syntax for the field_map part is tricky so go through it once interactively to set the parameters ...


This seems to work when you have a simple feature layer, however when the feature layer is joined the same code appears to run but actually has no effect. I am using ArcMap 9.1 and VB.Net. As I say this sub will work but only on the unjoined layer. On a joined layer the MessageBox returns false but looking in the Fields tab on properties shows all attributes ...


This is not possible right now (without reimplementing the whole form view in python). Please open a feature request, consider creating a pull request or funding somebody to implement this.


This will fail as the source doesn't exist. Try using a property dialog...and retrieve the value from there. Refer this link and this forum link

Only top voted, non community-wiki answers of a minimum length are eligible