evCreate API 5.7 Help

SetAngles Function

Updates the angles of the starting and ending radii of a given arc item from an Envision document currently opened in the Canvas Envision Creator app.

SetAngles(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], startAngle?: number, spanAngle?: number): Promise<void>

Parameters

obj: EvItem

An Object item object, an arc item from the Envision document currently opened in the Canvas Envision Creator app whose starting and ending radii should have their angles updated.

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

startAngle?: number

A number, a new angle in the angle unit of measure (UoM) global for the entire evCreate API that should be set between the following parts of the given arc item:

  • The vertical axis of the bounding box.

  • The starting radius.

The 0 angle is the 12 o'clock position: the starting arc radius aligns with the vertical axis of the arc bounding box. Positive numbers rotate the starting radius from the vertical bounding box axis clockwise, and negative numbers rotate it counterclockwise. A valid value depends on the angle UoM. For degrees, it is in the range from -359.0 to 359.0.

If this parameter is not given, the starting radius angle remains unchanged.

The startAngle and spanAngle properties of an EvArcAttributes object

spanAngle?: number

A number, an angle in the UoM global for the entire evCreate API that should be set between the following parts of the given arc item:

  • The starting radius.

  • The ending radius.

Positive numbers rotate the ending radius from the starting radius clockwise, and negative numbers rotate it counterclockwise. A valid value depends on the angle UoM. For degrees, it is in the range from -359.0 to 359.0.

If this parameter is not given, the starting radius angle remains unchanged.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the starting and ending radius angles of the given arc have been successfully updated.

01 May 2025