How to create a custom FeatureClass using SDK?

2615
2
Jump to solution
03-02-2016 08:07 AM
Highlighted
New Contributor III

Hello,

I'm currently looking for a way to create new workspaces and custom FeatureClasses with the Pro SDK.

At the moment, i'm using Geoprocessing tools to create a new GDB workspace and a new FeatureClass (using an existing layer as a schema template).

Geoprocessing.ExecuteToolAsync("management.CreateGDB", parameters)

Geoprocessing.ExecuteToolAsync("management.CreateFeatureClass", parameters)

This is fine if I have a template FeatureClass already. But how do I go about creating custom fields? There must be a way to create FeatureClasses without geoprocessing tools?

I couldn't find anything in the geodatabase snippets page to suggest this was possible, but it seems like a pretty vital operation. Am I looking in the wrong place?

Any help greatly appreciated!

Best regards,

Luke

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor

Hi Luke,

No you are not looking in the wrong place. Agreed- all this geoprocessing stuff for basic GDB,FC and Field creation is really, really nasty. It's so slow when you have a few fields to make.

Here is how to make a field via GP

https://community.esri.com/message/559621#comment-559621

Adam

View solution in original post

2 Replies
Highlighted
Occasional Contributor

Hi Luke,

No you are not looking in the wrong place. Agreed- all this geoprocessing stuff for basic GDB,FC and Field creation is really, really nasty. It's so slow when you have a few fields to make.

Here is how to make a field via GP

https://community.esri.com/message/559621#comment-559621

Adam

View solution in original post

Highlighted
New Contributor III

Cheers Adam. Just what I need. I'm surprised these operations aren't exposed outside of GP. Hoping they will be at some point. Not nice at all to work with.

Regards,

Luke

Reply
0 Kudos