Programatically Add Annotations

There are function or methods in BiAnno DLL or OCX which allow developers to add annotation objects programmatically, without user activity. There are several functions or methods to set properties of annotation objects programmatically.

 

[C++]

 

#include “BiAnno.h”

 

/* Create a new rectangle as annotation object */

 

// lAnno is a valid annotation handle

if (CreateAnnoObj(lAnno, A_RECT) != ANNO_UNDEF)

{

         // Set the position of the annotation object

         AnnoObjSetPos(lAnno, 10, 10);

         // Set the size of the annotation object

         AnnoObjSetSize(lAnno, 50, 50);

         …

         // Refresh annotations

         …

}

 

[VB]

 

‘ Create a rectangle as annotation object

 

If BiAnno.CreateAnnoObj(aotRect) Then

         ‘ Set the position of the annotation object

         BiAnno. AnnoObjSetPos (10, 10)

         ‘ Set the size of the annotation object

         BiAnno.AnnoObjSetSize (50, 50)

         …

         ‘ Refresh annotations

         …

End If

 

[C#]

 

/* Create a rectangle as annotation object */

if (BiAnno.CreateAnnoObj(BIANNOLib.ObjectType.aotRect))

{

     // Set the position of the annotation object

         BiAnno. AnnoObjSetPos (10, 10)

         // Set the size of the annotation object

         BiAnno.AnnoObjSetSize (50, 50)

         …

         // Refresh annotations

         …

}