insertTexture MethodStatic


insertTexture(txn, definitionModelId, name, format, data, description?) @beta

Insert a new texture into a DefinitionModel.

insertTexture(txn: EditTxn, definitionModelId: string, name: string, format: ImageSourceFormat, data: string | Uint8Array, description?: string): string

@returns The Id of the newly-inserted texture element.

@throws IModelError if unable to insert the element.

@see insertTexture to insert a new texture into the iModel.

Parameter Type Description
txn EditTxn  
definitionModelId string The DefinitionModel to contain the texture.
name string The name to serve as the texture's Code value.
format ImageSourceFormat The format of the image data.
data string | Uint8Array The image data in the format specified by format.
description string An optional description of the texture

Returns - string

The Id of the newly-inserted texture element.



insertTexture(iModelDb, definitionModelId, name, format, data, description?)

Deprecated  in 5.1.9 - will not be removed until after 2026-08-04. Use Texture.insertTexture(txn, ...) instead.

Insert a new texture into a DefinitionModel.

insertTexture(iModelDb: IModelDb, definitionModelId: string, name: string, format: ImageSourceFormat, data: string | Uint8Array, description?: string): string

Parameter Type Description
iModelDb IModelDb  
definitionModelId string  
name string  
format ImageSourceFormat  
data string | Uint8Array  
description string  

Returns - string


Defined in

Last Updated: 07 May, 2026