DisplayStyleState Class

A DisplayStyle defines the parameters for 'styling' the contents of a ViewState.

Extends

Extended by

Implements

Methods

Name Description
constructor(props: DisplayStyleProps, iModel: IModelConnection, source?: DisplayStyleState): DisplayStyleState Construct a new DisplayStyleState from its JSON representation.  
attachRealityModel(props: ContextRealityModelProps): void Attach a context reality model  
changeBackgroundMapProps(props: BackgroundMapProps): void Modify a subset of the background map display settings.  
changeMapLayerCredentials(index: number, isOverlay: boolean, userName?: string, password?: string): void    
changeMapSubLayerProps(props: MapSubLayerProps, subLayerId: SubLayerId, layerIndex: number, isOverlay: boolean): void    
changeRenderTimeline(timelineId: Id64String | undefined): Promise<void> Change the Id of the RenderTimeline element that hosts the RenderSchedule.Script to be applied by this display style for Beta  
detachRealityModelByIndex(index: number): void Detach a context reality model from its index.  
detachRealityModelByNameAndUrl(name: string, url: string): void Detach a context reality model from its name and url.  
dropModelAppearanceOverride(modelId: Id64String): void Remove any appearance overrides applied to a DisplayStyleState.Model by this style.  
dropRealityModelAppearanceOverride(index: number): boolean Drop the appearance overrides for a context reality model displayed by this style.  
dropRealityModelPlanarClipMask(modelIdOrIndex: Id64String | number): boolean Drop the planar clip mask for a reality model. Beta  
dropSubCategoryOverride(id: Id64String): void Remove any SubCategoryOverride applied to a SubCategoryAppearance by this style.  
equalState(other: DisplayStyleState): boolean Performs logical comparison against another display style.  
findRealityModelIndex(accept: (model: ContextRealityModelState) => boolean): number Find index of a reality model. Beta  
forEachRealityModel(func: (model: ContextRealityModelState) => void): void    
getModelAppearanceOverride(id: Id64String): FeatureAppearance | undefined Obtain the override applied to a DisplayStyleState.Model by this style.  
getOSMBuildingDisplayIndex(): number   Beta  
getRealityModelAppearanceOverride(index: number): FeatureAppearance | undefined Obtain the override applied to a context reality model displayed by this style.  
getRealityModelIndexFromTransientId(id: Id64String): number Return the "contextual" reality model index for a transient model ID or -1 if none found Beta  
getRealityModelPlanarClipMask(modelIdOrIndex: Id64String | number): PlanarClipMaskState | undefined Obtain the planar clip applied to a context reality model  
getSubCategoryOverride(id: Id64String): SubCategoryOverride | undefined Obtain the overrides applied to a SubCategoryAppearance by this style.  
hasAttachedRealityModel(name: string, url: string): boolean Return if a context reality model is attached.  
is3d(): this Returns true if this is a 3d display style.  
load(): Promise<void> Ensures all of the data required by the display style is loaded.  
overrideModelAppearance(modelId: Id64String, ovr: FeatureAppearance): void Customize the way a DisplayStyleState.Model is drawn by this display style.  
overrideRealityModelAppearance(index: number, overrides: FeatureAppearance): boolean Change the appearance overrides for a context reality model displayed by this style.  
overrideRealityModelPlanarClipMask(modelIdOrIndex: Id64String | number, mask: PlanarClipMaskSettings): boolean Override the planar clip mask for a reality model.  
overrideSubCategory(id: Id64String, ovr: SubCategoryOverride): void Customize the way geometry belonging to a SubCategory is drawn by this display style.  
setOSMBuildingDisplay(options: OsmBuildingDisplayOptions): boolean   Beta  

Inherited methods

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

Properties

Name Type Description
backgroundColor Accessor ColorDef The background color for this DisplayStyle  
backgroundMapElevationBias Accessor ReadOnly number    
backgroundMapSettings Accessor BackgroundMapSettings The settings controlling how a background map is displayed within a view.  
hasModelAppearanceOverride Accessor ReadOnly boolean Returns true if model appearance overrides are defined by this style. Beta  
hasSubCategoryOverride Accessor ReadOnly boolean Returns true if an SubCategoryOverrides are defined by this style.  
modelAppearanceOverrides Accessor ReadOnly Map<Id64String, FeatureAppearance> The overrides applied by this style. Beta  
monochromeColor Accessor ColorDef The color used to draw geometry in monochrome mode.  
name Accessor ReadOnly string The name of this DisplayStyle  
onScheduleScriptReferenceChanged BeEvent<(newScriptReference: ScriptReference | undefined) => void> Event raised just before the DisplayStyleState.scheduleScriptReference property is changed. Beta  
scheduleScript Accessor ReadOnly Script | undefined The RenderSchedule.Script that animates the contents of the view, if any.  
scheduleScriptReference Accessor ReadOnly ScriptReference | undefined The RenderSchedule.Script that animates the contents of the view, if any, along with the Id of the element that hosts the script.  
settings Accessor ReadOnly DisplayStyleSettings The container for this display style's settings.  
viewFlags Accessor ViewFlags Flags controlling various aspects of the display style.  

Inherited properties

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

Defined in

Last Updated: 15 June, 2021