Adding an annotation to existing feature

Hi, everybody.

I work with PowerMap XM and I'd like to add a command that adds an annotation text to already existing feature. 

For example: I have created a linestring feature with one annotation text. And now I'd like to have a possibility to add next annotation to this feature, placed on other segment of this line.

How can I do that in Geospatial Administrator? I have checked 'Include in Command Manager menu' box at 'Annotate' tab in 'Methods' section. But PowerMap hung when I tried to call 'Place' command for this element of Command Manager.

Myzzard

  • This 'sounds' like you need to add another sub-feature, as point-text,  to the linestring feature, for this additional annotation.

    Jerry

     

  • Hello Myzzard,

    The annotate method using XFM Standard Operations library PlaceAnnotation or PlaceAnnotation2 procedures cannot be activated directly from the command manager. These annotate procedures assume that the standard edit method has been run immediately prior to its execution to provide the feature instance to annotate. The edit method loads the feature instance and adds it to the global feature list for use by the annotation method.

    I am assuming that you want to place a second instance of the same annotation feature type. In your annotation sub-feature definition, change the value of "Max Occurs" from 1 to a different value in the list. I chose "unbounded" to allow an unlimited number of occurrences of this annotation sub-feature in a feature instance. To place the next annotation, use the edit tool to select the feature, hit OK on edit dialog, and place the next annotation. See the GasMain feature example in the attached schema.

    Another option: Using the XFM Standard Operations library procedure PlaceAnnotation (not "PlaceAnnotation2" that is created by default when inserting placement metadata), you have the option to specify an "allowMultiple" parameter. See the WaterMain feature example in the attached schema. The problem with PlaceAnnotation procedure is that it only supports annotation aligned with the feature (not view, away, leadered, etc). PlaceAnnotation procedure parameters are: annotationFeatureName, annotationFeatureAlias, annotationGroup, cmdPrompt, toolSettingsOp, toolSettingsName, allowMultiple. Also PlaceAnnotation does not stop placing annotations when "Max Occurs" is reached when placing a series of annotations. On a subsequent edit, "Max Occurs" value would be checked. If you want "Max Occurs" of "unbounded" then this will not matter to you.

    Chris


    This is a test

    multipleAnnotation.zip
  • Thanks, Chris,

    That's exactly what I needed.

    Regards,

    Mariusz