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