CategorySelectorState Class

A set of Categories to be displayed in a ViewState. Elements belonging to categories not specified in the category selector will not be drawn in the view. By default, geometry belonging to any SubCategory of a visible Category is also visible in the view, unless the SubCategoryAppearance or SubCategoryOverride specifies that it should be invisible.

@note To change the set of categories visible in a ViewState currently associated with a Viewport, use ViewState.changeCategoryDisplay to ensure the view updates appropriately on screen.

@see Category

Extends

Methods

Name Description
constructor(props: CategorySelectorProps, iModel: IModelConnection): CategorySelectorState    
addCategories(arg: Id64Arg): void Add one or more categories to this CategorySelector  
changeCategoryDisplay(arg: Id64Arg, add: boolean): void Add or remove categories from this CategorySelector.  
dropCategories(arg: Id64Arg): void Remove one or more categories from this CategorySelector  
equalState(other: CategorySelectorState): boolean Returns true if this category selector is logically equivalent to the specified category selector.  
has(id: string): boolean Determine whether this CategorySelector includes the specified categoryId string  
isCategoryViewed(categoryId: string): boolean Determine whether this CategorySelector includes the specified category  
toJSON(): CategorySelectorProps Obtain this element's JSON representation.  

Inherited methods

Name Inherited from Description
clone(iModel?: IModelConnection): CategorySelectorState ElementState Make an independent copy of this EntityState
equals(other: CategorySelectorState): boolean ElementState Return true if this EntityState is equal to another one.

Properties

Name Type Description
categories Accessor Set<string>    
className Accessor StaticReadOnly string The name of the BIS class associated with this class.  
name Accessor ReadOnly string The name of this CategorySelector  

Inherited properties

Name Type Inherited from Description
classFullName Accessor StaticReadOnly string ElementState Get full BIS class name of this Entity in the form "SchemaName:ClassName".
classFullName Readonly string ElementState The full class name in the form "schema:class".
className Accessor ReadOnly string ElementState The name of the BIS class associated with this class.
code Readonly Code ElementState The Code for this element
federationGuid Readonly undefined | string ElementState A FederationGuid assigned to this element by some other federated database
id Readonly string ElementState The Id of this Entity.
iModel Readonly IModelConnection ElementState The iModel from which this Entity was loaded
jsonProperties Readonly { T } ElementState Optional json properties of this Entity.
model Readonly string ElementState The ModelId of the Model containing this element
parent Readonly undefined | RelatedElement ElementState The parent Element of this, or undefined if no parent.
schemaName Accessor StaticReadOnly string ElementState The name of the BIS schema for this class.
userLabel Readonly undefined | string ElementState A user-assigned label for this element.

Defined in

Last Updated: 19 April, 2024