API Reference > imodeljs-backend > ViewDefinitions > CategorySelector > insert insert MethodStatic Insert a CategorySelector to select which categories are displayed by a ViewDefinition. insert(iModelDb: IModelDb, definitionModelId: string, name: string, categories: Id64Array): string throws IModelError if unable to insert the element. Parameter Type Description iModelDb IModelDb Insert into this iModel definitionModelId string Insert the new CategorySelector into this DefinitionModel name string The name of the CategorySelector categories Id64Array Array of categories to select for display Returns - string The Id of the newly inserted CategorySelector element. Defined in core/backend/src/ViewDefinition.ts Line 150 Last Updated: 11 June, 2024