FeatureOverrides Class

Specifies how to customize the appearance of individual Features, typically within the context of a Viewport. It is possible to override multiple aspects of a Feature. For example, you might specify that all elements belonging to subcategory "A" should be drawn in red, and that the element with Id "0x123" should be drawn with 0.25 transparency. In this case, when drawing a Feature with subcategory "A" and element Id "0x123", the two overrides will be merged, causing the Feature's geometry to draw 25% transparent red. On the other hand, if subcategory "A" is specified to draw in red and element "0x123" to draw in green, the color specified by the element override will take precedence over that specified for the subcategory, resulting in a green Feature.

see FeatureSymbology.Overrides to create overrides specific to a Viewport or ViewState.

Methods

Name Description
constructor(): FeatureOverrides Construct a new Overrides that overrides nothing.  
getElementOverridesById(id: Id64String): FeatureAppearance | undefined Returns the overrides applied to geometry belonging to the specified element, if any such are defined.  
getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary): FeatureAppearance | undefined Returns the feature's appearance overrides, or undefined if the feature is not visible.  
getModelOverridesById(id: Id64String): FeatureAppearance | undefined Returns the overrides applied to geometry belonging to the specified model, if any such are defined.  
getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined.  
isFeatureVisible(feature: Feature): boolean Returns true if the specified Feature will be drawn.  
isSubCategoryIdVisible(id: Id64String): boolean Returns true if geometry belonging to the specified subcategory will be drawn.  
isSubCategoryVisible(idLo: number, idHi: number): boolean Returns true if the SubCategory specified by Id is in the set of visible subcategories.  
overrideAnimationNode(id: number, app: FeatureAppearance): void Specify overrides for all geometry originating from the specified animation node.  
overrideElement(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void Specify overrides for all geometry originating from the specified element.  
overrideModel(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void Specify overrides for all elements within the specified model.  
overrideSubCategory(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void Specify overrides for all geometry belonging to the specified SubCategory.  
setAlwaysDrawn(id: Id64String): void Specify the Id of an element that should always be drawn.  
setAlwaysDrawnSet(ids: Id64Set, exclusive: boolean, ignoreSubCategory: boolean = true): void Specify the Ids of elements that should always be drawn.  
setAnimationNodeNeverDrawn(id: number): void Specify the Id of a animation node that should never be drawn.  
setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void Defines a default appearance to be applied to any Feature not explicitly overridden.  
setNeverDrawn(id: Id64String): void Specify the Id of an element that should never be drawn.  
setNeverDrawnSet(ids: Id64Set): void Specify the Ids of elements that should never be drawn.  
setVisibleSubCategory(id: Id64String): void Add a SubCategory to the set of visible subcategories.  

Properties

Name Type Description
_alwaysDrawn Protected Uint32Set Ids of elements that should always be drawn.  
_constructions Protected boolean Whether construction geometry should be drawn.  
_defaultOverrides Protected FeatureAppearance Overrides applied to any feature not explicitly overridden.  
_dimensions Protected boolean Whether dimensions should be drawn.  
_elementOverrides Protected Uint32Map<FeatureAppearance> Overrides applied to specific elements.  
_lineWeights Protected boolean Whether line weights should be applied.  
_modelOverrides Protected Uint32Map<FeatureAppearance> Overrides applied to all elements belonging to each model.  
_neverDrawn Protected Uint32Set Ids of elements that should never be drawn.  
_patterns Protected boolean Whether area patterns should be drawn.  
_subCategoryOverrides Protected Uint32Map<FeatureAppearance> Overrides applied to geometry belonging to each subcategory.  
_subCategoryPriorities Protected Uint32Map<number> Display priorities assigned to subcategories, possibly overridden by display style.  
_visibleSubCategories Protected Uint32Set The set of displayed subcategories.  
alwaysDrawnIgnoresSubCategory boolean If true, the always-drawn elements are drawn even if their subcategories are not visible. Beta
defaultOverrides Accessor ReadOnly FeatureAppearance Overrides applied to features for which no other overrides are defined  
isAlwaysDrawnExclusive boolean If true, no elements except those defined in the "always drawn" set will be drawn.  
lineWeights Accessor ReadOnly boolean Whether or not line weights are applied.  

Defined in

Last Updated: 02 September, 2020