AnsweredAssumed Answered

Is it possible to specify fields to create feature class with?

Question asked by maxmaxmaxmaxmax on Jan 30, 2017
Latest reply on Feb 1, 2017 by maxmaxmaxmaxmax

Wiki page on the ArcGIS Pro SDK github states that all schema creation and modification operations such as creating tables and feature classes, creating and modifying fields, enabling attachments, and so on, need to be performed using the Geoprocessing API.


Now let's imagine that you develop a tool that takes FGDB feature class, does some magic with its features and writes result to shapefile. But you want the output feature class will have exactly the same fields as the input one. OK, you are going to use Create Feature Class geoprocessing tool for that, passing the input feature class as template parameter. But if input fields contains those which name consist of more than 10 characters, you will get an error.


Is it possible to take input fields, correct them (or do any other actions) and pass modified fields to the method that creates a feature class?


The only workaround I see now is to create feature class without template and then add each field one by one with Add Field geoprocessing tool. But it is obviously bad solution since it is very slow when working with a lot of fields. It is sad to know that DDL in ArcGIS Pro SDK is much less flexible than in ArcObjects