Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there an ArcObjects function to get a short name version of an SDE featureclass?

For example if my featureclass is:

FOOSCHEMA.BARLAYER

How do I just get "BARLAYER".

Or is it just a simple case of using string manipulation techniques with your language of choice?

BTW - This is an ArcEngine app.

share|improve this question
1  
Why not use IFeatureclass.AliasName? Its purpose is to provide a user friendly name. It is editable via IClassSchemaEdit. –  Kirk Kuykendall Sep 27 '11 at 21:01
    
I think you have to edit that yourself though? –  Vidar Sep 28 '11 at 8:37
add comment

2 Answers 2

up vote 5 down vote accepted

Cast the sde workspace to ISqlSyntax and use the ParseTableName function.

share|improve this answer
    
Brilliant - I don't think I would ever have found that. –  Vidar Sep 28 '11 at 8:38
add comment

Got LINQ? Just stick a .Split('.').Last() on your property or variable that has the featureclass name.

featureClassName.Split('.').Last()
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.