evCreate API 5.7 Help

AutoCreate Function

Draws auto-dimensions of a given type for given object items from an Envision document currently opened in the Canvas Envision Creator app.

AutoCreate(objs: [[[EvItem|canvas-envision-document-items.html#object-items]]][], type?: [[[EvAutoDimensionsTypes|evautodimensionstypes-enumeration.html]]]): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]][]>

Parameters

objs: EvItem[]

An array of Object item objects, object items from the Envision document currently opened in the Canvas Envision Creator app whose auto-dimensions should be indicated.

type?: EvAutoDimensionsTypes

A member of the EvAutoDimensionsTypes enumeration, a type of auto-dimension that should be drawn for the given object items.

The default value is "all".

Return value

Promise<EvItem[]>

A Promise that, if fulfilled, resolves to an array of Object item objects that are the created dimension items with the auto-dimensions indicated for the given object items.

Discussion

Object items given in the objs property should support an auto-dimension type given in the type property. If no object item supports the given auto-dimension type, the function throws an error. For example, a diameter is given for rectangles. If at least one object item from the given object items supports the given auto-dimension type, the function does the following:

  • Draws the auto-dimension for that given object item.

  • Ignores other given object items.

10 April 2025