evCreate API 5.7 Help

CreateEmpty Function

Creates a new image item without an image attached to it in an Envision document currently opened in the Canvas Envision Creator app.

CreateEmpty( at: [[[EvCoord2D|evcoord2d-type-alias.html]]], width: number, height: number, zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]] ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

at: EvCoord2D

An EvCoord2D type alias, the 2D coordinates where the top left corner of the bounding box of the new image item should be located on the page.

The default value is [0, 0].

width: number

A number, the width of the bounding box of the new image item in the length UoM global for the evCreate API.

height: number

A number, the height of the bounding box of the new image item in the length UoM global for the evCreate API.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

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

  • The position of the new image item 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.

Return value

Promise<EvItem>

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

17 April 2025