evCreate API 5.7 Help

GetZOrder Function

Returns an EvObjectZOrder object with:

  • The layer item object of the layer that contains a given object item.

  • The position of the given object item in the stack of object items on that layer.

GetZOrder(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]]): Promise<undefined | [[[EvObjectZOrder|evobjectzorder-interface.html]]]>

Parameters

obj: EvItem

An Object item object, an object item from the Envision document currently opened in the Canvas Envision Creator app whose layer and stack position on it should be returned.

Return value

Promise<undefined | EvObjectZOrder>

A Promise that, if fulfilled, resolves to either:

  • undefined if the given object item exists in the document but is not a part of the document structure. This case is rare.

  • An EvObjectZOrder object with:

    • The layer item object of the layer that contains the given object item.

    • The index of the given object item's position in the stack of object items on that layer.

The function throws an error if the given object item does not exist in the document.

27 March 2025