evCreate API 5.7 Help

Create Function

Creates a new lens item at given coordinates of the magnified area and lens frame on a page in an Envision document currently opened in the Canvas Envision Creator app.

Create( startPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], endPt: [[[EvCoord2D|evcoord2d-type-alias.html]]], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]], shape?: [[[EvLensShape|evlensshape-enumeration.html]]], magnification?: number, viewArea?: [[[EvLensMagnificationViewArea|evlensmagnificationviewarea-enumeration.html]]], absolute?: boolean ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

startPt: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the starting point of the new lens item's leader line that is the center of a magnified area on the page to be displayed in the lens frame.

endPt: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of the endpoint of the new lens item's leader line that is a point on the lens frame that should display the magnified area.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

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

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

shape?: EvLensShape

A member of the EvLensShape enumeration, the lens frame shape of the new lens item.

The default value is "oval".

magnification?: number

A number, the magnification factor of the new lens item, where 100 is 100% of the original size.

The default value is 200.

viewArea?: EvLensMagnificationViewArea

A member of the EvLensMagnificationViewArea enumeration, a setting that defines which object items in the magnification area should be displayed in the lens frame of the new lens item depending on their vertical layout position relative to the new lens item.

The default value is 0, which is all the object items in the magnification area.

absolute?: boolean

A Boolean, a switch to determine the behavior of the magnified area position when the lens frame is moved to a new position on the page:

  • true: absolute—the magnified area stays at the same position.

    Absolute lens position

  • false: relative—the magnified area is moved to a new position relative to the new position of the lens frame, but the starting point position of the leader line remains the same.

    Relative lens position

The default value is true.

Return value

Promise<EvItem>

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

01 May 2025