Create Annotation feature class with the SDL

857
2
11-30-2020 05:58 AM
mody_buchbinder
Occasional Contributor III

Hi All

There is no GP tool in Pro to create annotation feature class (stand alone).

The Create Feature Class does not have annotation as a type.

If you do a right click on a geodatabase and select new feature class you get very similar tool that let you create annotation. It looks like a GP but it is not. I cannot see it in gp history after I run it.

Create a feature class in the SDK is done with the gp tool and I could not find any way to create annotation in code.

There are classes to handle annotation feature class (annotationFeatureClass will let you add features etc.)

So what is the way to create a new one?

Thanks

0 Kudos
2 Replies
RichRuh
Esri Regular Contributor

Hi Mody,

Unfortunately, you've found a hole in our programming APIs.  As you have discovered, there is no geoprocessing tool and no Pro SDK API.  Currently, the only way to programmatically create an annotation feature class is to create an XML file and use the Import XML Workspace Document tool.  You can use the Export XML Workspace Document tool on an existing geodatabase with annotation classes to see the format of the XML file.

While I hope this helps you in the short-term, we definitely don't consider this an acceptable work-around.  We've started the process of adding geodatabase data definition language (DDL) into the Pro SDK.  You'll see the first fruits of this effort in a pre-release at the Pro 2.7 release that will allow you to create tables and feature classes.  We'll be adding capabilities to this over time, and based on this thread I'm going to increase the priority of creating annotation feature classes.

I hope this helps.  Sorry it wasn't a better answer.

--Rich

0 Kudos
mody_buchbinder
Occasional Contributor III

Hi Rich

One more workaround I am thinking about is to keep somewhere an empty annotation feature class that I created and to copy it to where I need it. The feature class to feature class gp tools works.

Thanks