insert MethodStatic

Deprecated  Use Texture.insertTexture.

Insert a new Texture into a model.

insert(iModelDb: IModelDb, definitionModelId: string, name: string, format: ImageSourceFormat, data: string | Uint8Array, _width: number, _height: number, description: string, _flags: undefined): string

throws IModelError if unable to insert the element.

Parameter Type Description
iModelDb IModelDb Insert into this iModel
definitionModelId string Insert the new Texture into this DefinitionModel
name string The name/CodeValue of the Texture
format ImageSourceFormat Format of the image data
data string | Uint8Array The image data in a string
_width number unused.
_height number unused.
description string An optional description of the texture
_flags undefined unused.

Returns - string

The Id of the newly inserted Texture element.

Defined in

Last Updated: 12 June, 2024