evCreate API 5.7 Help

SetPosition Function

Updates the 2D coordinates of a given reference point on the bounding box of a given object item in the 2D space of an Envision document currently opened in the Canvas Envision Creator app.

SetPosition( obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], pos: [[[EvCoord2D|evcoord2d-type-alias.html]]], transformed?: boolean, refPoint?: [[[EvRefPoint|evrefpoint-enumeration.html]]] ): Promise<void>

Parameters

obj: EvItem

An Object item object, an object item from the Envision document currently opened in the Canvas Envision Creator app whose position in the 2D document space should be updated.

pos: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the new position of the given object item's reference point in the 2D document space.

transformed?: boolean

A Boolean, a switch to indicate whether the given reference point is on the transformed (true) or original (false) bounding box of the given object item.

The default value is false.

refPoint?: EvRefPoint

A member of the EvRefPoint enumeration, a reference point on the bounding box of the given object item whose coordinates in the 2D document space should be updated.

The default value is the top left corner: "top_left".

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given object item has been successfully moved to the new position in the 2D space of the current document.

09 April 2025