X
34 Rate this article:
No rating

[INTERNAL] Adding a graphic annotation in an iTool programmatically

Berangere Casson

This help Article describes the steps to add a graphic annotation  in an iTool in a programmatic way.

Note: this Help Article is set as Internal because we do not promote iTools anymore. However the technical steps described in this article can be shared with customers who are still using iTools if needed.

1. Step 1: create the iTool

     iplot, indgen(10)

 

2. Step 2:  get the reference to the current iTool

           idTool = ITGETCURRENT( TOOL = oTool )

 

3. Step3: find and get the object reference of the annotation layer

       idAnnotationLayer = oTool.findIdentifiers( '*ANNOTATION LAYER*' )


     oAnnotationLayer = oTool.getByIdentifier(idAnnotationLayer)

 

4. Step 4: create the graphic annotation - a rectangle polygon in this example

      oTextAnnotation = IDLitVispolygon( $

            DATA=[[-0.1,-0.63],[0.1,-0.63],[0.1,0.63],[-0.1,0.63]],$


      FILL_COLOR=[255,255,0], TRANSPARENCY=70)

5. Step 5: add the annotation to the annotation layer

                oAnnotationLayer.add, oTextAnnotation

 

6. Step 6:  update the itool to display the annotation

                oTool.CommitActions

 

______________________________________________________________________

Company Confidential (see note in the HA for more details), review 2/26/2014 by BC