Creates and associates a new annotation to a specific content element of this document.
This is a convenience method for creating an
Annotation object from the document. You can also create an
Annotation directly
using the
Factory.Annotation.createInstance() method, and then setting the
AnnotatedObject property with the object on which
the
Annotation is placed.
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)
Visual Basic (Declaration) |
---|
Function CreateAnnotation ( _
annotatedContentElement As Integer, _
className As String _
) As IAnnotation |
C# |
---|
IAnnotation CreateAnnotation(
int annotatedContentElement,
string className
) |
Visual C++ |
---|
IAnnotation^ CreateAnnotation(
int annotatedContentElement,
String^ className
) |
JavaScript |
---|
function createAnnotation(annotatedContentElement, className); |
Parameters
- annotatedContentElement
- Type: System..::.Int32
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
- Type: System..::.String
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.