Proceed to GeoCommunity Home Page


SpatialNewsGIS Data DepotGeoImaging ChannelGIS and MappingSoftwareGIS JobsGeoBids-RFPsGeoCommunity MarketplaceGIS Event Listings
HomeLoginAccountsAboutContactAdvertiseSearchFAQsForumsCartFree Newsletter

Sponsored by:


TOPICS
Today's News

Submit News

Feature Articles

Product Reviews

Education

News Affiliates

Discussions

Newsletters

Email Lists

Polls

Editor's Corner


SpatialNews Daily Newswire!
Subscribe now!

Latest Industry Headlines
SiteVision GIS Partnership With City of Roanoke VA Goes Live
Garmin® Introduces Delta™ Upland Remote Trainer with Beeper
Caliper Offers Updated Chile Data for Use with Maptitude 2013
Southampton’s Go! Rhinos Trail Mapped by Ordnance Survey
New Approach to Measuring Coral Growth Offers Valuable Tool for Reef Managers
Topo ly - Tailor-Fit for Companies' Online Mapping Needs

Latest GeoBids-RFPs
Nautical Charts*Poland
Software & Telemetry GPS
Spatial Data Management-DC
Geospatial and Mapping-DC
Next-Gen 911-MO

Recent Job Opportunities
Planner/GIS Specialist
Team Leader- Grape Supply Systems
Geospatial Developer

Recent Discussions
Raster images
cartographic symbology
Telephone Exchange areas in Europe
Problem showcasing Vector map on Windows CE device
Base map

GeoCommunity Mailing List
 
Mailing List Archives

Subject: [gislist] Display of field alias names
Date:  04/17/2007 05:55:00 PM
From:  Solomon Pulapkura



Hi all,
I have programmatically been able to change the alias names of fields of a
feature class in SDE using IClassSchemaEdit. But when I use the identify
tool, the names dont appear as changed. I have to actually remove the
feature class from the TOC and then add it again in ArcMap. Then the changed
alias names are visible when I identify a feature.
pMxDoc.UpdateContentsalso does not do the trick. Can anyone suggest a
workaround?
I've attached bits of the code...not the entire one..only relevant parts. So
dont be confused if something you think should be there is not there. The
code works. Code

Dim pClassSchemaEdit As IClassSchemaEdit
Dim pLayer As ILayer
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pTableFields As ITableFields

Public Sub openFC()

Dim pPropertySet As IPropertySet
Set pPropertySet = New PropertySet

With pPropertySet
.SetProperty "Server", "viper"
.SetProperty "Instance", "esri_sde"
.SetProperty "user", "public_works"
.SetProperty "password", "public_works"
.SetProperty "version", "sde.DEFAULT"
End With

Dim pWrkspcFactory As IWorkspaceFactory
Dim pWrkspc As IWorkspace

Set pWrkspcFactory = New SdeWorkspaceFactory
Set pWrkspc = pWrkspcFactory.Open(pPropertySet, hWnd)

Dim pFeatWrkspc As IFeatureWorkspace
Set pFeatWrkspc = pWrkspc

Dim pGPSFClass As IFeatureClass
Set pGPSFClass = pFeatWrkspc.OpenFeatureClass("PUBLIC_WORKS.GPS_MASTER")

Dim pOClass As IObjectClass
Set pOClass = pGPSFClass

Set pSchemaLock = pOClass

Set pClassSchemaEdit = pOClass

End Sub


'Signs
If GPSLayersListBox.Text = "Signs" Then


Call openFC

pSchemaLock.ChangeSchemaLock esriExclusiveSchemaLock

'change aliases for signs layer
pClassSchemaEdit.AlterFieldAliasName "X", "X Coordinate"
pClassSchemaEdit.AlterFieldAliasName "Y", "Y Coordinate"
pClassSchemaEdit.AlterFieldAliasName "FCODE", "Feature Code"
pClassSchemaEdit.AlterFieldAliasName "HANSEN_NUM", "Hansen Project Number"
pClassSchemaEdit.AlterFieldAliasName "MUTCD_NUM", "MUTCD Number"
pClassSchemaEdit.AlterFieldAliasName "BGCOLOR", "Background Color"
pClassSchemaEdit.AlterFieldAliasName "FGCOLOR", "Foreground Color"
pClassSchemaEdit.AlterFieldAliasName "SIZE_", "SIZE"
pClassSchemaEdit.AlterFieldAliasName "DESCP_COND", "Condition"

pSchemaLock.ChangeSchemaLock esriSharedSchemaLock

End If
_______________________________________________
gislist mailing list
gislist@lists.geocomm.com
http://lists.geocomm.com/mailman/listinfo/gislist

_________________________________
This list is brought to you by
The GeoCommunity
http://www.geocomm.com/

Sponsored by:

For information
regarding
advertising rates
Click Here!

Copyright© 1995-2012 MindSites Group / Privacy Policy

GeoCommunity™, Wireless Developer Network™, GIS Data Depot®, and Spatial News™
including all logos and other service marks
are registered trademarks and trade communities of
MindSites Group