evCreate API 5.7 Help

SetEndPoints Function

Updates the 2D coordinates of the starting, ending, or both endpoints of a given line item in an Envision document currently opened in the Canvas Envision Creator app.

SetEndPoints( obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], start?: [[[EvCoord2D|evcoord2d-type-alias.html]]], end?: [[[EvCoord2D|evcoord2d-type-alias.html]]] ): Promise<void>

Parameters

obj: EvItem

An Object item object, a line item from the Envision document currently opened in the Canvas Envision Creator app whose endpoints should be moved to the given new positions.

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

start?: EvCoord2D

An EvCoord2D type alias, an array of given new X and Y coordinates of the starting endpoint of the given line item.

If it is not given, the coordinates of the starting endpoint remain unchanged.

end?: EvCoord2D

An EvCoord2D type alias, an array of given new X and Y coordinates of the ending endpoint of the given line item.

If it is not given, the coordinates of the ending endpoint remain unchanged.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given new 2D coordinates of the starting, ending, or both endpoints of a given line have been successfully set.

04 April 2025