evCreate API 5.7 Help

CreateSimpleAuto Function

Creates an annotation with an autogenerated label value in an Envision document currently opened in the Canvas Envision Creator app.

CreateSimpleAuto( startPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], endPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]], shape?: [[[EvAnnotationShape|evannotationshape-enumeration.html]]], type?: [[[EvAnnotationAutoType|evannotationautotype-enumeration.html]]], reset?: boolean ): 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 new 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".

type?: EvAnnotationAutoType

A member of the EvAnnotationAutoType enumeration, the type of the autogenerated label value of the new annotation.

The default value is "label".

reset?: boolean

A Boolean, a switch to indicate whether to reset (true) or continue (false) the sequence of the autogenerated annotation labels.

The default value is false.

This property is ignored for the "label" annotation label type.

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