insert MethodStatic


insert(txn, definitionModelId, name, defaultAppearance) @beta

Insert a new DrawingCategory

insert(txn: EditTxn, definitionModelId: string, name: string, defaultAppearance: SubCategoryAppearance | SubCategoryAppearance.Props): string

@returns The Id of the newly inserted DrawingCategory element.

@throws IModelError if unable to insert the element.

Parameter Type Description
txn EditTxn The EditTxn to use
definitionModelId string Insert the new DrawingCategory into this DefinitionModel
name string The name of the DrawingCategory
defaultAppearance SubCategoryAppearance | SubCategoryAppearance.Props The appearance settings to use for the default SubCategory of this DrawingCategory

Returns - string

The Id of the newly inserted DrawingCategory element.



insert(iModelDb, definitionModelId, name, defaultAppearance)

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

Insert a new DrawingCategory

insert(iModelDb: IModelDb, definitionModelId: string, name: string, defaultAppearance: SubCategoryAppearance | SubCategoryAppearance.Props): string

Parameter Type Description
iModelDb IModelDb  
definitionModelId string  
name string  
defaultAppearance SubCategoryAppearance | SubCategoryAppearance.Props  

Returns - string


Defined in

Last Updated: 18 April, 2026