Skip to main content
Version: 8.3

system.historian.types.annotationPoint

New in 8.3.5

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​

TypeParameterDescription
StringsourceThe historical path where the annotation point will be stored.
DatestartTimeThe start time associated with the annotation.
DateendTimeThe end time associated with the annotation. If omitted, the annotation has no end time. [optional]
StringannotationTypeA string used to categorize the annotation (for example, "marker", "note", or "event"). If omitted, "marker" is used. [optional]
StringdataA 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]
StringidentifierAn identifier used to indicate that an existing annotation should be updated. [optional]
note

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 and Store an Annotation
# 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])