SetPoints Function
Replaces all the vertices of a given polygon item from an Envision document currently opened in the Canvas Envision Creator app with given new vertices.
Parameters
obj: EvItemAn Object item object, a polygon item from the Envision document currently opened in the Canvas Envision Creator app whose vertices should be replaced with the given new vertices.
If a given object item is not a polygon, the function throws an error.
points: EvCoord2D[]An array of
EvCoord2Darrays, an array of 2D coordinates of points that define given new vertices that should replace all the existing vertices of the given polygon item.For a closed polygon, the coordinates of the starting and ending points must be the same.

Return value
Promise<void>A Promise that, if fulfilled, resolves to
voidif the given new vertices have successfully replaced the existing ones of the given polygon item in the current document.