evCreate API 5.7 Help

Create Function

Creates a new table item with a given number of rows and columns in a given bounding box, either empty or prepopulated with given content and formatting, in an Envision document currently opened in the Canvas Envision Creator app.

Create( rows: number, columns: number, bounds: [[[EvRect|evrect-interface.html]]], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]], cellTexts?: string[], font?: [[[EvFontStyle|evfontstyle-interface.html]]], withMarkdown?: boolean ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

rows: number

A number, the number of rows the new table item should have.

columns: number

A number, the number of columns the new table item should have.

bounds: EvRect

An EvRect object, the position and size of the bounding box of the new table item. The bounding box size defines the dimensions of the table rows and columns.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

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

  • The position of the new table 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.

cellTexts?: string[]

An array of strings, the text that should be contained in each cell of the new table item in row-major order: when it comes to the last cell in a row, it continues from the first cell in the next row.

An array of the cells of a given table item in row-major order.

The default value is empty cells.

font?: EvFontStyle

An EvFontStyle object, a custom text formatting that should be applied to the text contained in the new table item.

If Markdown formatting is included in a cell text, it is applied to this text after the custom text formatting has been applied.

withMarkdown?: boolean

A Boolean, a flag to indicate whether the given cell texts include (true) or do not include (false) Markdown formatting.

The default value is false.

Return value

Promise<EvItem>

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

01 May 2025