system.historian.types.annotationPoint
This function is used in Python Scripting.
Description​
Creates an annotation point that can be stored to a historian. Annotation points represent time-based context, such as operator notes, events, or system-generated markers associated with a historical path.
The returned object is used with system.historian.storeAnnotations.
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.historian.types.annotationPoint(source, startTime, [endTime], [annotationType], [data], [identifier])
Parameters​
| Type | Parameter | Description |
|---|---|---|
| String | source | The historical path where the annotation point will be stored. |
| Date | startTime | The start time associated with the annotation. |
| Date | endTime | The end time associated with the annotation. If omitted, the annotation has no end time. [optional] |
| String | annotationType | A string used to categorize the annotation (for example, "marker", "note", or "event"). If omitted, "marker" is used. [optional] |
| String | data | A string payload associated with the annotation. This can contain plain text or structured data, such as JSON. If omitted, an empty string is used. [optional] |
| String | identifier | An identifier used to indicate that an existing annotation should be updated. [optional] |
The annotationType parameter is not restricted to a predefined set of values. You can define custom types to organize and query annotations as needed.
Returns​
AnnotationPoint - An annotation point object that can be passed to system.historian.storeAnnotations.
Scope​
Gateway, Vision Client, Perspective Session
Code Examples​
# Create an annotation point and store it using the historian API.
source = "histprov:default:/tag:MyTag"
startTime = system.date.now()
annotation = system.historian.types.annotationPoint(
source,
startTime,
annotationType="OperatorNote",
data="Maintenance performed"
)
system.historian.storeAnnotations([annotation])