evCreate API 5.7 Help

RemoveLayer Function

Removes permanently a given layer from a page in an Envision document currently opened in the Canvas Envision Creator app.

RemoveLayer(layer: [[[EvItem|canvas-envision-document-items.html#layer-items]]], moveObjects: boolean): Promise<void>

Parameters

layer: EvItem

A Layer item object of a layer that should be removed from a page in the Envision document currently opened in the Canvas Envision Creator app.

moveObjects: boolean

A Boolean, a flag to specify whether to permanently delete the removed layer with or without its objects:

  • false: to delete the layer and its objects.

  • true: to delete only the layer and move its objects to an adjacent layer.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given Layer item object has been successfully removed from the page in the current Envision document.

Discussion

Trying to remove the only layer from a page will not remove it but will raise an error.

11 March 2025