evCreate API 5.7 Help

Create Function

Creates an arc item in an Envision document currently opened in the Canvas Envision Creator app.

Create( center: [[[EvCoord2D|evcoord2d-type-alias.html]]], xRadius: number, yRadius: number, startAngle: number, spanAngle: number, zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]] ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

center: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the center of the ellipse that defines the arc shape of the new arc item.

The center, xRadius, and yRadius properties of an arc item

xRadius: number

A number, a semi-axis of the ellipse that defines the arc shape along the horizontal axis of the bounding box of the new arc item.

For arc shapes between the xRadius and yRadius, xRadius is equal to the width of the bounding box of an arc item.

For arc shapes between the xRadius and yRadius, xRadius is equal to the arc item bounding box width.

For arc shapes crossing the yRadius, xRadius is half the bounding box width.

For arc shapes crossing the yRadius, xRadius is half of the arc item bounding box width.

Resizing the bounding box width updates the xRadius.

yRadius: number

A number, a semi-axis of the ellipse that defines the arc shape along the vertical axis of the bounding box of the new arc item.

For arc shapes between the xRadius and yRadius, yRadius is equal to the height of the bounding box of an arc item.

For arc shapes between the xRadius and yRadius, xRadius is equal to the arc item bounding box width.

For arc shapes crossing the xRadius, yRadius is half the bounding box height.

For arc shapes crossing the xRadius, yRadius is half the arc item bounding box width.

Resizing the bounding box height updates the yRadius.

startAngle: number

A number, an angle in the angle unit of measure (UoM) global for the entire evCreate API between the following parts of the new 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.

The startAngle and spanAngle properties of an EvArcAttributes object

spanAngle: number

A number, an angle in the angle UoM global for the entire evCreate API between the following parts of the new 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.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

  • The layer item object of a layer in the current document where the new arc item should be added. The default value is the current layer on the current page.

  • The position of the new arc item in the stack of object items on the given layer. It is a zero-based index that is 0 for the topmost object item on the layer and increases by 1 for each following object item going down the stack. The default value is 0.

Return value

Promise<EvItem>

A Promise that, if fulfilled, resolves to an Object item object of the new arc item successfully created in the current document.

01 May 2025