EmphasizeElements Class

An implementation of FeatureOverrideProvider for emphasizing selected elements through simple color/transparency appearance overrides.

Implements

Methods

Name Description
constructor(): EmphasizeElements    
addFeatureOverrides(overrides: FeatureSymbology.Overrides, vp: Viewport): void Establish active feature overrides to emphasize elements and apply color/transparency overrides.  
clearAlwaysDrawnElements(vp: Viewport): boolean Clear always drawn elements.  
clearEmphasizedElements(vp: Viewport): boolean Clear emphasized elements.  
clearEmphasizedIsolatedElements(vp: Viewport, setToAlwaysDrawn: boolean): boolean Clear emphasized isolated elements.  
clearHiddenElements(vp: Viewport): boolean Clear hidden elements.  
clearIsolatedElements(vp: Viewport): boolean Clear isolated elements.  
clearNeverDrawnElements(vp: Viewport): boolean Clear never drawn elements.  
clearOverriddenElements(vp: Viewport, keyOrIds?: number | Id64Arg): boolean Clear color/transparency overrides from elements.  
createDefaultAppearance(): FeatureAppearance Create default appearance to use for emphasizeElements when not supplied by caller.  
createOverrideKey(color: ColorDef, override: FeatureOverrideType): undefined | number Get override key from color and override type  
emphasizeElements(ids: Id64Arg, vp: Viewport, defaultAppearance?: FeatureAppearance, replace: boolean = true): boolean Set the element IDs to be always drawn normally with all other elements in the view overridden to draw using a default appearance.  
emphasizeSelectedElements(vp: Viewport, defaultAppearance?: FeatureAppearance, replace: boolean = true, clearSelection: boolean = true): boolean Set the currently selected elements to be always drawn normally with all other elements in the view overridden to draw using a default appearance.  
fromJSON(props: EmphasizeElementsProps, vp: Viewport): boolean Initialize from JSON representation.  
getAlwaysDrawnElements(vp: Viewport): undefined | Id64Set Get the IDs of the currently always drawn elements.  
getEmphasizedElements(vp: Viewport): undefined | Id64Set Get the IDs of the currently emphasized elements.  
getEmphasizedIsolatedElements(): undefined | Id64Set Get the IDs of the currently emphasized isolated elements.  
getHiddenElements(vp: Viewport): undefined | Id64Set Get the IDs of the currently hidden elements.  
getIsolatedElements(vp: Viewport): undefined | Id64Set Get the IDs of the currently isolated elements.  
getNeverDrawnElements(vp: Viewport): undefined | Id64Set Get the IDs of the currently never drawn elements.  
getOverriddenElements(): undefined | Map<number, Id64Set> Get the map of current elements with color/transparency overrides.  
getOverriddenElementsByKey(key: number): undefined | Id64Set Get the IDs of current elements with the specified color/transparency override.  
getOverrideFromKey(key: number): { color: ColorDef, overrideType: FeatureOverrideType } Get color and override type for the given key.  
hideElements(ids: Id64Arg, vp: Viewport, replace: boolean = false): boolean Set the element IDs to be never drawn.  
hideSelectedElements(vp: Viewport, replace: boolean = false, clearSelection: boolean = true): boolean Set the currently selected elements to be never drawn.  
isActive(vp: Viewport): boolean    
isolateElements(ids: Id64Arg, vp: Viewport, replace: boolean = true): boolean Set the element IDs to be always drawn exclusively.  
isolateSelectedElements(vp: Viewport, replace: boolean = true, clearSelection: boolean = true): boolean Set the currently selected elements to be always drawn exclusively.  
overrideElements(ids: Id64Arg, vp: Viewport, color: ColorDef, override: FeatureOverrideType = FeatureOverrideType.ColorOnly, replace: boolean = false): boolean Set the element IDs to display with a color/transparency override.  
overrideSelectedElements(vp: Viewport, color: ColorDef, override: FeatureOverrideType = FeatureOverrideType.ColorOnly, replace: boolean = false, clearSelection: boolean = true): boolean Set the currently selected elements to display with a color/transparency override.  
toJSON(vp: Viewport): EmphasizeElementsProps Serialize to JSON representation.  
clear(vp: Viewport, inactiveOnly: boolean = false): void Static Drop the EmphasizeElements provider currently registered with the specified Viewport, if any is registered.  
get(vp: Viewport): undefined | EmphasizeElements Static Return the EmphasizeElements provider currently registered with the specified Viewport, if one is already registered.  
getOrCreate(vp: Viewport): EmphasizeElements Static Return the EmphasizeElements provider currently registered with the specified Viewport, or register a new one and return it.  

Properties

Name Type Description
defaultAppearance Accessor undefined | FeatureAppearance Establish a default appearance to apply to elements without overrides.  
unanimatedAppearance Accessor undefined | FeatureAppearance Establish a default appearance to apply to elements that are not animated by the view's RenderSchedule.Script.  
wantEmphasis boolean If true, all overridden and emphasized elements will also have the "emphasis" effect applied to them.  

Defined in

Last Updated: 16 April, 2024