Skip to main content
I've been working on generating multiple feature-linked annotations (I have two annotation classes per feature I want written) at the creation time of a feature in a feature class for ArcMap.  Currently I can only get FME to generate  one annotation for each feature written.  When using a list as specified in the FME help document, FME creates two duplicate features and each annotation class. 

 

 

It is my understanding that a list of "geodb_text{i}" needs to be created on the feature for this to work.  I have added those attributes accordingly via the Attribute Creator transformer and used the ListExploder to create the list.  When I hook this to the writer I get both annotations I expect, albeit on seperate features. 

 

 

The help documentation I've been following is: http://docs.safe.com/fme/2009/html/ReadersWriters/geodatabase_-_feature-linked_annotation.htm

 

 

Any pointers on how to get this working would be greatly appreciated.  I'm currently using FME2013 SP1 and attempting to write to an ArcGIS 10.0 file geodatabase.
Hi,

 

 

the ListExploder doesn't create a list. You can create directly the "geo_text" list with the AttributeCreator through setting attribute names like below: geo_text{0}.geo_text_feat_class_name geo_text{0}.geo_text_string geo_text{1}.geo_text_feat_class_name geo_text{1}.geo_text_string etc.

 

Takashi
I've added those to the attribute creator.   It doesnt utilize any of those attributes when it gets to the writer.   Attempting to hook those attributes to the writer won't work either since the geo_text_feat_class_name only allows one attribute to be hooked into it.  That is where I am stuck.  I don't understand how it is supposed to use the list I create in the AttributeCreator to generate multiple annotations for a single feature.
... sorry I'm not sure where the main problem is exactly. If the main problem is how to change list elements to main attributes, the ListIndexcer transformer might help you. For example, when you specify "geo_text{}" as "List Attribute" and 0 as "List Index" parameter, the ListIndexcer changes "geo_text{0}.<attribute name>" to "<attribute name>".

 

 

Takashi
When I use the ListIndexer transformer I get the following error message...

 

 

Runtime Error!

 

Program: C:\\Program Files\\FME\\fme.exe

 

 

R6025

 

-pure virtual function call

 

 

The exception unknown software exception (0x40000015) occured in the application at location 0x048037e4.
Hi,

 

 

Safe usually recommends to create the schema or the fgdb with annotations properties in ArcCatalog and then mapping the fme feature attributes in the ws 

 

 

This demo (ca min. 8:30)  shows the method behind mapping annotation classes and feature linked annotation classes should work the same way.

 

 

Hope this helps.
Hi,

 

 

I tested with a simple mock-up workspace. 1) Add a geodb_text{} to each input feature through an AttributeCreator. Added attribute names are: geodb_text{i}.geodb_text_feat_class_name geodb_text{i}.geodb_text_string geodb_text{i}.geodb_text_x_coord geodb_text{i}.geodb_text_y_coord geodb_text{i}.geodb_text_size * i = 0 and 1   2) Add a geodatabase writer and insert 3 writer feature types (one for geometry feature, 2 for annotation features) to the worksapce. The names of annotation feature types are same as geodb_text{i}.goedb_text_feat_class_name.   3) Split the flow of input features into 3 streams, and connect - one stream to geometry feature writer directly. - other 2 streams to (separately)   -> ListIndexer (List Attribute = geodb_text{}, List Index = i)   -> AttributeKeepr (keep only geodb_text_string)   -> annotation feature writer.   It worked, but I'm not sure if this is the correct way. For your information.

 

Takashi
strange...

 

This workspace also worked. 2 annotation feature types are needed, but have no connection with input features. Hope somebody can explain this.

 

Takashi
Ok, I finally figured this out.  Looks like I actually had a typo in the attribute "geo_text_feat_class_name".   The method you two suggested in writing to the annotation fc directly isn't supported for feature-linked annotations.  The reason for this is simply that there is no way to get the object ID from the newly written feature into the same pass as when the annotation would be written.  Looks like simply adding the appropriate attributes into an attribute creator and sending that to the writer just handles it as expected (both annotations are created when the feature is written).  Thanks for all your help trying to figure this one out, I certainly learned a good deal from it.
Hi amasephy,

 

sorry to dig this topic out again, but I'm currently working on the same topic and followed the instructions Takashi (thanks!) gave in here.

 

Could you please explain what exactly is to do differently when working with feature-linked annotations and the "geodb_linked_feature_id"-Attribute?

 

 

Greets and thanks in advance!

 

Andy

Reply