evCreate API 5.7 Help

SetData Function

Attaches a given image provided as raw binary data to a given image item from an Envision document currently opened in the Canvas Envision Creator app.

SetData(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], data: [[[EvImageData|evimagedata-interface.html]]]): Promise<void>

Parameters

obj: EvItem

An Object item object, an image item from the Envision document currently opened in the Canvas Envision Creator app to which a given image should be attached.

If a given object item is not an image, the function throws an error.

data: EvImageData

An EvImageData object, the raw binary data of a given image that should be attached to the given image item.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given image has been successfully attached to the given image item.

Discussion

If an image is already attached to the given image item, the given image replaces that attached image.

02 April 2025