Tag Info

Hot answers tagged

8

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 ...


5

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 ...


4

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.


4

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", ...


2

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 ...


2

Kirk, 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 ...


1

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.


1

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