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 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): this Inherited ElementState Make an independent copy of this EntityState
equals(other: this): boolean Inherited ElementState Return true if this EntityState is equal to another one.

Properties

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

Defined in

Last Updated: 14 November, 2024