-
Notifications
You must be signed in to change notification settings - Fork 15
Add View Filters #1502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GCRA101
wants to merge
131
commits into
develop
Choose a base branch
from
Revit_Toolkit-#1444-FilterPrototype
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add View Filters #1502
Changes from 128 commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
6525ab7
draft oM classes added
pawelbaran 495685a
draft support for pull of views and view filters added
pawelbaran 48d61ff
draft support for views and view filters added
pawelbaran 08ba4fb
Merge branch 'Revit_Toolkit-#1444-FilterPrototype' of https://github.…
GCRA101 917cf9f
Add bespoke classes defining graphics settings for new view filters
GCRA101 fcb57c0
Rename Class FilterWithOverrides to ViewFilterWithOverrides
GCRA101 1b9d28d
Add FilterRuleType Enumeration
GCRA101 e70ed56
Move classes FillPattern, FilterRule and LinePattern from Elements to…
GCRA101 0ed3572
Implement Update of View based on filters and overrides
GCRA101 561839a
Add minor updates to main classes in Elements namespace
GCRA101 ae53ef6
Implement Conversion of BHoM classes to Revit
GCRA101 b38eab0
Add minor updates to BHoM ViewFilterOverrides Class
GCRA101 54a0143
Update Query/BHoMType.cs class for View and ParameterFilterElement
GCRA101 07b0fa1
Minor updates to main new classes for View and filtering
GCRA101 0efa9b0
Merge branch 'Revit_Toolkit-#1444-FilterPrototype' of https://github.…
GCRA101 4620c1b
Add FilterRuleEvaluatorType Enumeration
GCRA101 3f2a258
Add FilterValueRule and modify FilterRuleType
GCRA101 93b92c9
Delete FilterRuleType Enum
GCRA101 1776342
Create FilterRule classes mirroring Revit API classes
GCRA101 54d1526
Move FillPattern and LinePattern to the Enums Namespace
GCRA101 fa49711
Modify BHoM Enum TextComparisonType
GCRA101 87e275c
Add LevelComparisonType Enumeration
GCRA101 4b1fa4f
Add conversion methods for FilterMaterialRule and FilterLevelRule in …
GCRA101 afd0b49
Update conversion of BHoM ViewFilters to Revit Parameter Filter Elements
GCRA101 4bbea09
Add enum values to TextComparisonType Enumeration
GCRA101 5cbef88
Update ToRevit ParameterFilterElement with additional TextComparisonT…
GCRA101 5c832b1
Add adapter code for FilterRules in ViewFilterFromRevit Method in Fro…
GCRA101 c329c72
Add FilterElementIdRule to the Revit BHoM Objects
GCRA101 6685f06
Add handling of FilterElementIdRule in conversion of ViewFilter From …
GCRA101 764157a
Initialize FilterRule Classes in FromRevit and ToRevit Namespaces
GCRA101 5338ba9
Delete all FilterRule classes created in the Convert.FromRevit/ToRevi…
GCRA101 29c3c1b
Reinstate the method filterCategoryRuleToRevit in the Convert.ToRevit…
GCRA101 41d425e
Add method to convert a Revit ParameterFilterElement into a BHoM View…
GCRA101 0186d7f
Incorporate minor fixes to references between classes
GCRA101 e0e27b2
Add ParameterValuePresenceRule
GCRA101 78306b0
Move all BHoM Filter Rules from oM.Elements to oM.FilterRules namespace.
GCRA101 4d56096
Refactor the partial class FromRevit.ViewFilter
GCRA101 0984037
Fix code for conversion of Revit Views into BHoM Views
GCRA101 69841b2
Make explicit distinction between Revit and BHoM View Class instances
GCRA101 5fefeed
Add conversion of BHoM FilterRule to Revit FilterRule
GCRA101 0c033a8
Fix bug with extraction of revit Id of selected parameter
GCRA101 23f5cae
Fix code for conversion of filterRules from BHoM to Revit_Core_Engine…
GCRA101 d60bfe5
Add call to method for convertion of FilterLevelRule to Revit.
GCRA101 bedbda8
Fix bug in creation of Revit Element Filter from BHoM FilterRules
GCRA101 a87ea3f
Add changes to Level and Material FilterRule Conversion
GCRA101 86d35dd
Fix bug with Push of View Filters based on Levels
GCRA101 1580cd6
Fix bug dispatching different types of FilterRule
GCRA101 07ab5b5
Turn FilterNumericValueRule into an abstract class
GCRA101 1fb229a
Fix bug related to incorrect extraction of Categories from the model.
GCRA101 06532f6
Add feature to create ViewFilters with No Rules.
GCRA101 55f414c
Fix code for extraction of categories and filter rules from Revit whe…
GCRA101 13a9772
Add GetParameterById Utility function and minor updates to parameter …
GCRA101 f6cdfc0
Add use of utility function GetParameterById where required to get pa…
GCRA101 fc1f664
Add conversion of double internal units when pulling filter parameter…
GCRA101 8ad2801
Add Update Method for Autodesk Revit View3D Class
GCRA101 463807e
Turn Update Methods for View and View3D into a single method using Ge…
GCRA101 42cd96d
Fix Fill and Line Pattern Name search turning letter case to Upper
GCRA101 9d17a6e
Fix bug text comparison between Cut and Surface Patterns
GCRA101 4be195d
Incorporate PR comments from Pawel Baran - Part01
GCRA101 a2f6205
Add new abstract class FilterParameterRule
GCRA101 b348415
Incorporate PR comments from Pawel Baran - Part02
GCRA101 5486724
Incorporate comments from Pawel Baran - Part03
GCRA101 3338dac
Incorporate PR Comments from Pawel Baran - Part04
GCRA101 7abafcc
draft oM classes added
pawelbaran 919b232
draft support for pull of views and view filters added
pawelbaran 584b00a
draft support for views and view filters added
pawelbaran 5fe79b2
Add bespoke classes defining graphics settings for new view filters
GCRA101 35ea7fa
Rename Class FilterWithOverrides to ViewFilterWithOverrides
GCRA101 042e1b9
Add FilterRuleType Enumeration
GCRA101 e0d96d6
Move classes FillPattern, FilterRule and LinePattern from Elements to…
GCRA101 4a7247e
Implement Update of View based on filters and overrides
GCRA101 4031e85
Add minor updates to main classes in Elements namespace
GCRA101 970b4f2
Implement Conversion of BHoM classes to Revit
GCRA101 b4724ed
Add minor updates to BHoM ViewFilterOverrides Class
GCRA101 3cf7985
Update Query/BHoMType.cs class for View and ParameterFilterElement
GCRA101 99691d4
Minor updates to main new classes for View and filtering
GCRA101 cd9f1aa
Add FilterRuleEvaluatorType Enumeration
GCRA101 214fb7e
Add FilterValueRule and modify FilterRuleType
GCRA101 a8a6590
Delete FilterRuleType Enum
GCRA101 620b9c7
Create FilterRule classes mirroring Revit API classes
GCRA101 045991f
Move FillPattern and LinePattern to the Enums Namespace
GCRA101 e084976
Modify BHoM Enum TextComparisonType
GCRA101 45d9b1c
Add LevelComparisonType Enumeration
GCRA101 ebe8d7b
Add conversion methods for FilterMaterialRule and FilterLevelRule in …
GCRA101 e851805
Update conversion of BHoM ViewFilters to Revit Parameter Filter Elements
GCRA101 92f256f
Add enum values to TextComparisonType Enumeration
GCRA101 b15705b
Update ToRevit ParameterFilterElement with additional TextComparisonT…
GCRA101 f14e530
Add adapter code for FilterRules in ViewFilterFromRevit Method in Fro…
GCRA101 167de7a
Add FilterElementIdRule to the Revit BHoM Objects
GCRA101 49cb7b6
Add handling of FilterElementIdRule in conversion of ViewFilter From …
GCRA101 d4aa31a
Initialize FilterRule Classes in FromRevit and ToRevit Namespaces
GCRA101 f65b802
Delete all FilterRule classes created in the Convert.FromRevit/ToRevi…
GCRA101 0d761a2
Reinstate the method filterCategoryRuleToRevit in the Convert.ToRevit…
GCRA101 4c9918d
Add method to convert a Revit ParameterFilterElement into a BHoM View…
GCRA101 223768c
Incorporate minor fixes to references between classes
GCRA101 0c1c4bf
Add ParameterValuePresenceRule
GCRA101 76bf7ec
Move all BHoM Filter Rules from oM.Elements to oM.FilterRules namespace.
GCRA101 aecfb01
Refactor the partial class FromRevit.ViewFilter
GCRA101 7ca2b5c
Fix code for conversion of Revit Views into BHoM Views
GCRA101 0ce26f7
Make explicit distinction between Revit and BHoM View Class instances
GCRA101 8bfe55d
Add conversion of BHoM FilterRule to Revit FilterRule
GCRA101 7f22f9d
Fix bug with extraction of revit Id of selected parameter
GCRA101 f99df39
Fix code for conversion of filterRules from BHoM to Revit_Core_Engine…
GCRA101 65f491b
Add call to method for convertion of FilterLevelRule to Revit.
GCRA101 a4a98af
Fix bug in creation of Revit Element Filter from BHoM FilterRules
GCRA101 5aeb945
Add changes to Level and Material FilterRule Conversion
GCRA101 3fe9b8f
Fix bug with Push of View Filters based on Levels
GCRA101 ccb18c5
Fix bug dispatching different types of FilterRule
GCRA101 dcf3b32
Turn FilterNumericValueRule into an abstract class
GCRA101 1ba1bca
Fix bug related to incorrect extraction of Categories from the model.
GCRA101 afc9460
Add feature to create ViewFilters with No Rules.
GCRA101 b172fb2
Fix code for extraction of categories and filter rules from Revit whe…
GCRA101 71f2d47
Add GetParameterById Utility function and minor updates to parameter …
GCRA101 bb2b11c
Add use of utility function GetParameterById where required to get pa…
GCRA101 4e5f8f9
Add conversion of double internal units when pulling filter parameter…
GCRA101 4796b12
Add Update Method for Autodesk Revit View3D Class
GCRA101 e236c32
Turn Update Methods for View and View3D into a single method using Ge…
GCRA101 9853368
Fix Fill and Line Pattern Name search turning letter case to Upper
GCRA101 bdde33f
Fix bug text comparison between Cut and Surface Patterns
GCRA101 d56be5b
Incorporate PR comments from Pawel Baran - Part01
GCRA101 4767a61
Add new abstract class FilterParameterRule
GCRA101 a6e0960
Incorporate PR comments from Pawel Baran - Part02
GCRA101 a2377a6
Incorporate comments from Pawel Baran - Part03
GCRA101 fbdae30
Incorporate PR Comments from Pawel Baran - Part04
GCRA101 518a274
Incorporate PR comments from Pawel Baran - Part 05
GCRA101 a521793
Merge modifications
GCRA101 a75cff0
Fix merge conflict
GCRA101 53b434e
Fix minor bugs with dynamic casting and conversion between Category E…
GCRA101 b36aaa2
Update name of method OverrideGraphicSettings#fromRevit based on Pasc…
GCRA101 94b1712
Remove FilterRule downcasting and use of generic T type in Update Met…
GCRA101 501e2c2
Replace Try-catch statements with If-then statments for controlling e…
GCRA101 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| /* | ||
| * This file is part of the Buildings and Habitats object Model (BHoM) | ||
| * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. | ||
| * | ||
| * Each contributor holds copyright over their respective contributions. | ||
| * The project versioning (Git) records all such contribution source information. | ||
| * | ||
| * | ||
| * The BHoM is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Lesser General Public License as published by | ||
| * the Free Software Foundation, either version 3.0 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * The BHoM is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public License | ||
| * along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>. | ||
| */ | ||
|
|
||
| using Autodesk.Revit.DB; | ||
| using BH.Engine.Adapters.Revit; | ||
| using BH.oM.Adapters.Revit.Elements; | ||
| using BH.oM.Adapters.Revit.Settings; | ||
| using BH.oM.Base; | ||
| using BH.oM.Base.Attributes; | ||
| using BH.oM.Revit.Enums; | ||
| using BH.oM.Revit.Views; | ||
| using BH.Revit.Engine.Core; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel; | ||
| using System.Drawing; | ||
| using System.Linq; | ||
| using System.Security.Policy; | ||
| using System.Xml.Linq; | ||
| using FilterRule = BH.oM.Revit.FilterRules.FilterRule; | ||
| using OverrideGraphicSettings = BH.oM.Adapters.Revit.Elements.OverrideGraphicSettings; | ||
| using View = Autodesk.Revit.DB.View; | ||
|
|
||
| namespace BH.Revit.Engine.Core | ||
| { | ||
| public static partial class Convert | ||
| { | ||
| /***************************************************/ | ||
| /**** Public Methods ****/ | ||
| /***************************************************/ | ||
|
|
||
| [Description("Converts a Revit View to BH.oM.Adapters.Revit.Elements.View.")] | ||
| [Input("revitView", "Revit View to be converted.")] | ||
| [Input("settings", "Revit adapter settings to be used while performing the convert.")] | ||
| [Input("refObjects", "Optional, a collection of objects already processed in the current adapter action, stored to avoid processing the same object more than once.")] | ||
| [Output("view", "BH.oM.Adapters.Revit.Elements.View resulting from converting the input Revit View.")] | ||
| public static oM.Adapters.Revit.Elements.View ViewFromRevit(this View revitView, RevitSettings settings = null, Dictionary<string, List<IBHoMObject>> refObjects = null) | ||
| { | ||
| settings = settings.DefaultIfNull(); | ||
|
|
||
| oM.Adapters.Revit.Elements.View view = refObjects.GetValue<oM.Adapters.Revit.Elements.View>(revitView.Id.IntegerValue); | ||
| if (view != null) | ||
| return view; | ||
|
|
||
| if (revitView.AreGraphicsOverridesAllowed()) { | ||
| /*1. Transfer ViewFilters and corresponding OverrideGraphicSettings into ViewFilterWithOverrides Objects - via STREAMS */ | ||
| List<ViewFilterWithOverrides> filtersWithOverrides = revitView.GetFilters().ToDictionary<ElementId, ViewFilter, OverrideGraphicSettings> | ||
| (elId => Convert.ViewFilterFromRevit((ParameterFilterElement)revitView.Document.GetElement(elId)), | ||
| elId => overrideGraphicSettingsFromRevit(revitView, revitView.GetFilterOverrides(elId))).ToList() | ||
| .Select(kvp => new ViewFilterWithOverrides { Filter = kvp.Key, Overrides = kvp.Value }).ToList(); | ||
| /*2. Create BHoM View Object with Name and FilterWithOverrides objects */ | ||
| view = new oM.Adapters.Revit.Elements.View { Name = revitView.Name, FiltersWithOverrides = filtersWithOverrides };} | ||
| else { view = new oM.Adapters.Revit.Elements.View { Name=revitView.Name };} | ||
|
|
||
| //Set identifiers, parameters & custom data | ||
| view.SetIdentifiers(revitView); | ||
| view.CopyParameters(revitView, settings.MappingSettings); | ||
| view.SetProperties(revitView, settings.MappingSettings); | ||
|
|
||
| refObjects.AddOrReplace(revitView.Id, view); | ||
| return view; | ||
| } | ||
|
|
||
| /***************************************************/ | ||
|
|
||
| private static OverrideGraphicSettings overrideGraphicSettingsFromRevit(this View element, Autodesk.Revit.DB.OverrideGraphicSettings revitOverrides) | ||
|
Check failure on line 85 in Revit_Core_Engine/Convert/Revit/FromRevit/View.cs
|
||
GCRA101 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| // Initialize BHoM OverrideGraphicsSettings object | ||
| OverrideGraphicSettings overrideGraphicsSettings = new OverrideGraphicSettings(); | ||
|
|
||
|
|
||
| // Convert COLORS | ||
| if (revitOverrides.CutLineColor.IsValid) overrideGraphicsSettings.LineColor = System.Drawing.Color.FromArgb(revitOverrides.CutLineColor.Red, revitOverrides.CutLineColor.Green, revitOverrides.CutLineColor.Blue); | ||
| if (revitOverrides.CutForegroundPatternColor.IsValid) overrideGraphicsSettings.CutColor = System.Drawing.Color.FromArgb(revitOverrides.CutBackgroundPatternColor.Red, revitOverrides.CutBackgroundPatternColor.Green, revitOverrides.CutBackgroundPatternColor.Blue); | ||
| if (revitOverrides.SurfaceBackgroundPatternColor.IsValid) overrideGraphicsSettings.SurfaceColor = System.Drawing.Color.FromArgb(revitOverrides.SurfaceBackgroundPatternColor.Red, revitOverrides.SurfaceBackgroundPatternColor.Green, revitOverrides.SurfaceBackgroundPatternColor.Blue); | ||
|
|
||
| // Convert LINE PATTERNS | ||
| try | ||
| { | ||
| String linePatternName = element.Document.GetElement(revitOverrides.CutLinePatternId).Name; | ||
GCRA101 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if (linePatternName.Replace(" ","").ToUpper().Contains("DASHDOTDOT")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.DashDotDot; } | ||
| else if (linePatternName.ToUpper().Replace(" ","").Contains("DASHDOT")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.DashDot; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("DOUBLEDASH")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.DoubleDash; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("LONGDASH")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.LongDash; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("LOOSEDASH")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.LooseDash; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("TRIPLEDASH")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.TripleDash; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("DASH")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.Dash; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("DOT")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.Dot; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("HIDDEN")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.Hidden; } | ||
| else if (linePatternName.ToUpper().Replace(" ", "").Contains("SOLID")) { overrideGraphicsSettings.LinePattern = oM.Revit.Enums.LinePattern.Solid; } | ||
| else { BH.Engine.Base.Compute.RecordWarning($"The Revit Line Pattern {linePatternName} is not implemented yet in the BHoM.\n By default, the Line Pattern {linePatternName} will be set to SOLID."); } | ||
| } | ||
| catch | ||
| { | ||
| BH.Engine.Base.Compute.RecordWarning($"The Revit Line Pattern for the Revit OverrideGraphicSettings {revitOverrides.ToString()} is not defined."); | ||
| } | ||
|
|
||
|
|
||
| // Convert CUT PATTERNS | ||
| try | ||
| { | ||
| String cutPatternName = element.Document.GetElement(revitOverrides.CutBackgroundPatternId).Name; | ||
|
|
||
| if (cutPatternName.ToUpper().Contains("CROSSHATCH") && !cutPatternName.ToUpper().Contains("DIAGONAL")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.CrossHatch; } | ||
| else if (cutPatternName.ToUpper().Contains("CROSSHATCH") && cutPatternName.ToUpper().Contains("DIAGONAL")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.DiagonalCrossHatch; } | ||
| else if (cutPatternName.ToUpper().Contains("DIAGONAL") && cutPatternName.ToUpper().Contains("DOWN")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.DiagonalDown; } | ||
| else if (cutPatternName.ToUpper().Contains("DIAGONAL") && cutPatternName.ToUpper().Contains("UP")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.DiagonalUp; } | ||
| else if (cutPatternName.ToUpper().Contains("HORIZONTAL")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.Horizontal; } | ||
| else if (cutPatternName.ToUpper().Contains("STEEL")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.Steel; } | ||
| else if (cutPatternName.ToUpper().Contains("SOLID")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.Solid; } | ||
| else if (cutPatternName.ToUpper().Contains("VERTICAL")) { overrideGraphicsSettings.CutPattern = oM.Revit.Enums.FillPattern.Vertical; } | ||
| else { BH.Engine.Base.Compute.RecordWarning($"The Revit Fill Pattern {cutPatternName} is not implemented yet in the BHoM.\n By default, the Fill Pattern {cutPatternName} will be set to SOLID."); } | ||
| } | ||
| catch | ||
| { | ||
| BH.Engine.Base.Compute.RecordWarning($"The Revit Fill Pattern for the Revit OverrideGraphicSettings {revitOverrides.ToString()} is not defined."); | ||
| } | ||
|
|
||
|
|
||
| // Convert SURFACE PATTERNS | ||
| try | ||
| { | ||
| String surfacePatternName = element.Document.GetElement(revitOverrides.SurfaceBackgroundPatternId).Name; | ||
|
|
||
| if (surfacePatternName.ToUpper().Contains("CROSSHATCH") && !surfacePatternName.ToUpper().Contains("DIAGONAL")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.CrossHatch; } | ||
| else if (surfacePatternName.ToUpper().Contains("CROSSHATCH") && surfacePatternName.ToUpper().Contains("DIAGONAL")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.DiagonalCrossHatch; } | ||
| else if (surfacePatternName.ToUpper().Contains("DIAGONAL") && surfacePatternName.ToUpper().Contains("DOWN")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.DiagonalDown; } | ||
| else if (surfacePatternName.ToUpper().Contains("DIAGONAL") && surfacePatternName.ToUpper().Contains("UP")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.DiagonalUp; } | ||
| else if (surfacePatternName.ToUpper().Contains("HORIZONTAL")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.Horizontal; } | ||
| else if (surfacePatternName.ToUpper().Contains("STEEL")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.Steel; } | ||
| else if (surfacePatternName.ToUpper().Contains("SOLID")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.Solid; } | ||
| else if (surfacePatternName.ToUpper().Contains("VERTICAL")) { overrideGraphicsSettings.SurfacePattern = oM.Revit.Enums.FillPattern.Vertical; } | ||
| else { BH.Engine.Base.Compute.RecordWarning($"The Revit Fill Pattern {surfacePatternName} is not implemented yet in the BHoM.\n By default, the Fill Pattern {surfacePatternName} will be set to SOLID."); } | ||
| } | ||
| catch | ||
| { | ||
| BH.Engine.Base.Compute.RecordWarning($"The Revit Fill Pattern for the Revit OverrideGraphicSettings {revitOverrides.ToString()} is not defined."); | ||
| } | ||
|
|
||
| return overrideGraphicsSettings; | ||
| } | ||
|
|
||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.