evCreate API 5.7 Help

CreateFromUrl Function

Creates a new 3D model object item in an Envision document currently opened in the Canvas Envision Creator app with a 3D model provided via a given URL.

CreateFromUrl( assemblyUrl: string, associatedFileUrls?: string[], options?: [[[Ev3DImportOptions|ev3dimportoptions-interface.html]]], at?: [[[EvCoord2D|evcoord2d-type-alias.html]]], width?: number, height?: number, zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]] ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

assemblyUrl: string

A string, a URL to an assembly file of a given 3D model that should be attached to the new 3D model object item.

associatedFileUrls?: string[]

An array of strings, one or more URLs to the files associated with the given 3D model that should be attached to the new 3D model object item.

options?: Ev3DImportOptions

An Ev3DImportOptions object, configurational settings for importing the given 3D model into the current document.

If a setting is not given, the default setting value is used.

at?: EvCoord2D

An EvCoord2D type alias, the 2D coordinates where the top left corner of the bounding box of the new 3D model object item should be located on the page.

If this parameter is not given, the bounding box of the new 3D model object item is centered on the page.

width?: number

A number, the width of the bounding box of the new 3D model object item in the length UoM global for the evCreate API.

The default value is to fit the page width.

height?: number

A number, the height of the bounding box of the new 3D model object item in the length UoM global for the evCreate API.

The default value is to fit the page height.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

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

  • The position of the new 3D model object 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 3D model item successfully created in the current document.

07 April 2025