BH.oM.Adapters.Revit.RevitComparisonConfig¶
Settings to determine the uniqueness of an Object for comparison (e.g. when Diffing or computing an object Hash).
Class structure¶
Implemented interfaces and base types¶
The RevitComparisonConfig is inheriting from the following base type(s) and implements the following interfaces:
- BH.oM.Base.BaseComparisonConfig
- BH.oM.Base.IObject
Properties¶
Defining properties¶
The following properties are defined on the class
Name | Type | Description | Quantity |
---|---|---|---|
ParametersExceptions | List<string> | Names of any Revit Parameter that should not be considered for the comparison. | - |
ParametersToConsider | List<string> | Names of the Revit Parameters that will be considered for the comparison.By default, this list is empty, so all parameters are considered (except possibly those included in the other property ParametersExceptions ).If this list is populated with one or more values, it takes higher priority over ParametersExceptions . |
- |
ParameterNumericTolerances | HashSet<NamedNumericTolerance> | Tolerance used for individual RevitParameters. When computing Hash or the property Diffing, if the analysed property name is found in this collection, the corresponding tolerance is applied. Supports * wildcard in the property name matching. E.g. StartNode.Point.*, 2 .If a match is found, this take precedence over the global NumericTolerance .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
ParameterSignificantFigures | HashSet<NamedSignificantFigures> | Number of significant figures allowed for numerical data on a per-RevitParameter base. Supports * wildcard in the property name matching. E.g. StartNode.Point.*, 2 .If a match is found, this take precedence over the global SignificantFigures .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
RevitParams_ConsiderAddedAssigned | bool | (Defaults to true ) If false, if an object gets a new RevitParameter with a non-null Value added to it, then the owner object is NOT considered 'Modified' and the Comparison will NOT return this difference. |
- |
RevitParams_ConsiderAddedUnassigned | bool | (Defaults to true ) If false, if an object gets a new RevitParameter with a null Value added to it, then the owner object is NOT considered 'Modified' and the Comparison will NOT return this difference. |
- |
RevitParams_ConsiderRemovedAssigned | bool | (Defaults to true ) If false, if an object has a RevitParameter with a non-null Value deleted from it, then the owner object is NOT considered 'Modified' and the Comparison will NOT return this difference. |
- |
RevitParams_ConsiderRemovedUnassigned | bool | (Defaults to true ) If false, if an object has a RevitParameter with a null Value deleted from it, then the owner object is NOT considered 'Modified' and the Comparison will NOT return this difference. |
- |
NumericTolerance | double | Numeric tolerance for property values, applied to all numerical properties. Defaults to 1e-6. Applies rounding for numbers smaller than this. You can override on a per-property basis by using PropertyNumericTolerances .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
Inherited properties¶
The following properties are inherited from the base class of the object
Name | Type | Description | Quantity |
---|---|---|---|
PropertyExceptions | List<string> | Names of properties you want to disregard in defining the uniqueness of an object. You can specify the property name or the Full Name. Supports * wildcard. Examples of valid values: BHoM_Guid , StartNode , Bar.StartNode.Position.X , Bar.*.Position.Y . See the wiki for more details. |
- |
PropertiesToConsider | List<string> | If one or more entries are specified here, only objects/properties that match them will be considered in the hash. E.g. Given input objects BH.oM.Structure.Elements.Bar, specifying StartNode will only check that property of the Bar.Like for PropertyExceptions, you can specify the property name or the Full Name. Supports * wildcard. Note that using this will incur in a general slowdown because it is computationally heavy. See the wiki for more details. |
- |
CustomdataKeysExceptions | List<string> | Keys of the BHoMObjects' CustomData dictionary that should be ignored. By default it includes RenderMesh . This does not support wildcard usage. See the wiki for more details. |
- |
CustomdataKeysToConsider | List<string> | Keys of the BHoMObjects' CustomData dictionary that should be included in the comparison. Adding keys to this List will exclude any key that is not in this List. I.e. for every object, if it has CustomData keys present in this List, we then exclude any other CustomData key found in it. |
- |
TypeExceptions | List<Type> | Any corresponding type is ignored. E.g. typeof(Guid) . |
- |
NamespaceExceptions | List<string> | Any corresponding namespace is ignored. E.g. BH.oM.Structure . Does not support wildcard. See the wiki for more details. |
- |
MaxNesting | int | If any property is nested into the object over that level, it is ignored. Useful to limit the runtime. Defaults to unlimited. |
- |
MaxPropertyDifferences | int | Sets the maximum number of property differences to be determined before stopping. Useful to limit the runtime. Defaults to unlimited. |
- |
PropertyNumericTolerances | HashSet<NamedNumericTolerance> | Tolerance used for individual properties. When computing Hash or the property Diffing, if the analysed property name is found in this collection, the corresponding tolerance is applied. Supports * wildcard in the property name matching. E.g. StartNode.Point.*, 2 .If a match is found, this take precedence over the global NumericTolerance .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
SignificantFigures | int | Number of significant figures allowed for numerical data. Defaults to int.MaxValue : no approximation applied.You can override on a per-property basis by using PropertySignificantDigits .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
PropertySignificantFigures | HashSet<NamedSignificantFigures> | Number of significant figures allowed for numerical data on a per-property base. Supports * wildcard in the property name matching. E.g. StartNode.Point.*, 2 .If a match is found, this take precedence over the global SignificantFigures .If conflicting values/multiple matches are found among the Configurations on numerical precision, the largest approximation among all (least precise number) is registered. |
- |
UseGeometryHash | bool | If true, geometric types will be identified based on the GeometryHash function. This function reduces the identity of geometry down to its most basic components, and it is faster than scouring for all its properties. See its implementation in the Geometry_Engine for more details. | - |
Code and Schema¶
C# implementation¶
Assembly: Revit_oM.dll
The C# class definition is available on github:
All history and changes of the class can be found by inspection the history.
JSON Schema implementation¶
The object is defined as a JSON schema. You can validate a JSON instance against this schema by reference. To do this, use the schema reference below in a validator like this one.
JSON Schema
{
"$ref" : "https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/Revit_oM/RevitComparisonConfig.json"
}
The JSON Schema is available on github here: