insert MethodStatic


insert(txn, parentCategoryId, name, appearance) @beta

Insert a new SubCategory

insert(txn: EditTxn, parentCategoryId: string, name: string, appearance: SubCategoryAppearance | SubCategoryAppearance.Props): string

@returns The Id of the newly inserted SubCategory element.

@throws IModelError if unable to insert the element.

Parameter Type Description
txn EditTxn The EditTxn to use
parentCategoryId string Insert the new SubCategory as a child of this Category
name string The name of the SubCategory
appearance SubCategoryAppearance | SubCategoryAppearance.Props The appearance settings to use for this SubCategory

Returns - string

The Id of the newly inserted SubCategory element.



insert(iModelDb, parentCategoryId, name, appearance)

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

Insert a new SubCategory

insert(iModelDb: IModelDb, parentCategoryId: string, name: string, appearance: SubCategoryAppearance | SubCategoryAppearance.Props): string

Parameter Type Description
iModelDb IModelDb  
parentCategoryId string  
name string  
appearance SubCategoryAppearance | SubCategoryAppearance.Props  

Returns - string


Defined in

Last Updated: 25 April, 2026