Question

How do I translate a dataset to an SDE geodatabase feature class that has a linked annotation class?


Badge

I'm trying to translate from text features (which translate with their "Text Location As Point") into feature-linked annotation in a GEODATABASE_SDE format. I have the feature class and the feature annotation class and the relationship between them set up in the geodatabase. When I only had the feature class created in the geodatabase I was able to run a translation and populate the feature class. But since creating the feature-linked annotation class in the geodatabase, I am unable to complete a translation.

Note that I made sure the feature class (map_element) and the feature linked annotation (map_element_anno) class had zero records before running the translation.

Also, note that there are many other feature classes and tables in the geodatabase. So if I were to use the workspace template method for the writer, the schema would contain much more than the features I'm trying to work with.

Here's the error message I get when I run the translation:

An error occurred while attempting to store a row into the table 'sde.map_element'. The error number from ArcObjects is: '-2147211171'. The error message from ArcObjects is: {Cannot open origin or destination class of this relationship class. [dev.sde.map_element_anno]}

I have verified that the classes referred to aren't locked.

 

The instructions in https://knowledge.safe.com/articles/21083/working-with-feature-linked-annotation.html are for a file geodatabase. I'm wondering if there's something different I have to do for an SDE geodatabase.

A secondary question I have is how can I get the orientation and size of the text being read to be used by the annotation in the annotation feature class? The translation workspace has a handle on both through the "fme_rotation" and "fme_text_size" attributes. Perhaps this is more a question for ESRI, but figured I'd throw it out here.


7 replies

Badge +6

Hello @angela!

 

I am sorry to hear you are having some trouble with Feature Linked annotations. It appears the error occurs when trying to insert a feature into the map_element(non-annotation feature class) - is that correct? An option you can try is using the XML Workspace template. With it being an ArcSDE, you can export the tables you wish(the tables required for your relationship class). You are able to specify which tables you want to be exported to the XML Workspace document. The template will then only create those tables.

 

 

I don't believe there is any behavioral difference between File and SDE Geodatabase. Are you able to share your workspace if the above does not work?

 

In response to your second question, I believe the orientation and size should be carried over by the writer automatically. If they do not, you may have to map them to the corresponding Format Attribute. For example geodb_text_size.

 

 

Let me know if that helps.
Badge

Hello @angela!

 

I am sorry to hear you are having some trouble with Feature Linked annotations. It appears the error occurs when trying to insert a feature into the map_element(non-annotation feature class) - is that correct? An option you can try is using the XML Workspace template. With it being an ArcSDE, you can export the tables you wish(the tables required for your relationship class). You are able to specify which tables you want to be exported to the XML Workspace document. The template will then only create those tables.

 

 

I don't believe there is any behavioral difference between File and SDE Geodatabase. Are you able to share your workspace if the above does not work?

 

In response to your second question, I believe the orientation and size should be carried over by the writer automatically. If they do not, you may have to map them to the corresponding Format Attribute. For example geodb_text_size.

 

 

Let me know if that helps.
Using a template means that, through running the FME translation, I'd be creating the two feature classes and the relationship between them from scratch in the geodatabase, correct? So presumably I'd need to drop them from the geodatabase after exporting the XML workspace document and before running the FME translation?

 

Also, would the fact that there are many other feature classes in the geodatabase which would be included in the XML workspace document be a problem?

 

 

Badge +6
Using a template means that, through running the FME translation, I'd be creating the two feature classes and the relationship between them from scratch in the geodatabase, correct? So presumably I'd need to drop them from the geodatabase after exporting the XML workspace document and before running the FME translation?

 

Also, would the fact that there are many other feature classes in the geodatabase which would be included in the XML workspace document be a problem?

 

 

The number of Feature classes would only be a problem if you have those same feature classes in the XML Workspace document. If you do not, it should not create those additional tables(only the ones you have in the XML document). If running the translation repeatedly through the template, you would need to drop the tables each time.

 

Alternatively, if you are able to share the workspace, that may help as well.
Badge
The number of Feature classes would only be a problem if you have those same feature classes in the XML Workspace document. If you do not, it should not create those additional tables(only the ones you have in the XML document). If running the translation repeatedly through the template, you would need to drop the tables each time.

 

Alternatively, if you are able to share the workspace, that may help as well.
Thanks Trent. When I run export Export XML Workspace Document, it exports everything in the geodatabase. Or else I can do individual exports on the feature classes, but Exporting an XML workspace document isn't an option for the feature-linked annotation class. So I guess I'd have to go with the former option and then remove everything but the two feature classes and their relationship before using the xml as the template?

 

 

By the way, I'd be happy to share the workspace with you, but it uses our Smallworld edition of FME of which we have only one and it's in use by my colleague at the moment.

 

 

 

Badge +6
Thanks Trent. When I run export Export XML Workspace Document, it exports everything in the geodatabase. Or else I can do individual exports on the feature classes, but Exporting an XML workspace document isn't an option for the feature-linked annotation class. So I guess I'd have to go with the former option and then remove everything but the two feature classes and their relationship before using the xml as the template?

 

 

By the way, I'd be happy to share the workspace with you, but it uses our Smallworld edition of FME of which we have only one and it's in use by my colleague at the moment.

 

 

 

Hi @angela

 

Are you creating the XML Workspace document through an ArcGIS Tool? If so, one method you could try to limit the Feature classes in the XML document is to open ArcCatalog, and Right-click the ArcSDE > Export > Export XML Workspace Document. Select Schema Only. Then you should get a window that asks you to choose which items to export. If you Exclude all, you can then select the tables you wish to use manually. Rather than having all the tables present in the XML document.

 

Badge

I had been using ArcPro to do the export to XML. I just now tried using ArcCatalog to do it per your suggest. And yes, it allowed me to choose the items to export. But the relationship between map_element and map_element_anno didn't appear in the list. So I chose just those two items. But when I tried to proceed with the export it failed. I got "Unable to create object class extension COM component [dev.sde.map_element_anno]".failuretoexporttoxml.png

Badge

I had been using ArcPro to do the export to XML. I just now tried using ArcCatalog to do it per your suggest. And yes, it allowed me to choose the items to export. But the relationship between map_element and map_element_anno didn't appear in the list. So I chose just those two items. But when I tried to proceed with the export it failed. I got "Unable to create object class extension COM component [dev.sde.map_element_anno]".failuretoexporttoxml.png

@trentatsafe

 

- Sorry I guess I should have entered that last comment as a reply to your last message.

Reply