evCreate API 5.7 Help

CreateFromUrl Function

Creates a new image item in an Envision document currently opened in the Canvas Envision Creator app with an image provided via a given URL.

CreateFromUrl( url: string, 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

url: string

A string, a URL to a given image that should be attached to the new image item.

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.

The default value is the width given in the image data.

height?: number

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

The default value is the height given in the image data.

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 image item successfully created in the current document.

01 April 2025