evCreate API 5.7 Help

CreateSimpleLabel Function

Creates an annotation with an arbitrary label text in an Envision document currently opened in the Canvas Envision Creator app.

CreateSimpleLabel( startPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], endPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]], shape?: [[[EvAnnotationShape|evannotationshape-enumeration.html]]], text?: string ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

startPt: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the start position of the new annotation's leader line on the page.

endPt: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the end position of the new annotation's leader line on the page.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

  • The layer item object of a layer in the current document where the new annotation should be added. The default value is the current layer on the current page.

  • The position of the new annotation in the stack of object items on the given layer. It is a zero-based index that is 0 for the topmost object item on the layer and increases by 1 for each following object item going down the stack. The default value is 0.

shape?: EvAnnotationShape

A member of the EvAnnotationShape enumeration, the shape of the label of the new annotation.

The default value is "no_shape".

text?: string

A string, an arbitrary piece of text that the annotation label should display.

The default value is "Label".

Return value

Promise<EvItem>

A Promise that, if fulfilled, resolves to an Object item object of the new annotation successfully created in the current document.

04 April 2025