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: Id64String, name: string, categories: Id64Array): Id64String throws IModelError if unable to insert the element. Parameter Type Description iModelDb IModelDb Insert into this iModel definitionModelId Id64String Insert the new CategorySelector into this DefinitionModel name string The name of the CategorySelector categories Id64Array Array of categories to select for display Returns - Id64String The Id of the newly inserted CategorySelector element. Defined in core/backend/src/ViewDefinition.ts Line 435 Last Updated: 13 June, 2024