2

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.

2
  • 1
    Why not use IFeatureclass.AliasName? Its purpose is to provide a user friendly name. It is editable via IClassSchemaEdit. Commented Sep 27, 2011 at 21:01
  • I think you have to edit that yourself though?
    – Vidar
    Commented Sep 28, 2011 at 8:37

2 Answers 2

5

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

1
  • Brilliant - I don't think I would ever have found that.
    – Vidar
    Commented Sep 28, 2011 at 8:38
1

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

featureClassName.Split('.').Last()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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