Creates and associates a new annotation to a specific content element of this document. To persist the created Annotation object to the object store, you must explicitly call its Save method, which will also cause the server to add it to the Annotations collection of this document.


Namespace: FileNet.Api.Core
Assembly: FileNet.Api (in filenet.api.dll)

Syntax

Visual Basic (Declaration)
Function CreateAnnotation( _ 
   ByVal annotatedContentElement As Integer,  _ 
   ByVal className As String _ 
) As IAnnotation
C#
IAnnotation CreateAnnotation(
   int annotatedContentElement,
   string className
)
C++
IAnnotation CreateAnnotation(
   int annotatedContentElement,
   String className
) abstract 
J#
IAnnotation CreateAnnotation(
   int annotatedContentElement,
   string className
)
JScript
function CreateAnnotation(
   annotatedContentElement : int,
   className : String
) : IAnnotation

Parameters

annotatedContentElement
An integer that specifies the index of the document content element to which this annotation applies. It is recommended that you specify a unique and unchanging identifier for a content element, such as the element's ElementSequenceNumber property. For more information, see the Annotation.AnnotatedContentElement property.
className
A String that specifies the symbolic name, ID, or GUID constant of the class type of the new annotation object. For a list of GUID constants, see the GUIDConstants class.

Return Value

An Annotation object.

See Also