insert MethodStatic


insert(txn, definitionModelId, name, isPrivate?)

Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.

insert(txn: EditTxn, definitionModelId: string, name: string, isPrivate?: boolean): string

@returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.

@throws IModelError if there is a problem inserting the TemplateRecipe2d or its sub-model.

Parameter Type Description
txn EditTxn  
definitionModelId string The Id of the DefinitionModel that contains this TemplateRecipe2d element.
name string The name (Code.value) of the TemplateRecipe2d
isPrivate boolean  

Returns - string

The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.



insert(iModelDb, definitionModelId, name, isPrivate?)

Deprecated  Use TemplateRecipe2d.insert(txn, ...) instead.

insert(iModelDb: IModelDb, definitionModelId: string, name: string, isPrivate?: boolean): string

Parameter Type Description
iModelDb IModelDb  
definitionModelId string  
name string  
isPrivate boolean  

Returns - string


Defined in

Last Updated: 18 April, 2026