-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grouping and sorting for parameter list
- Loading branch information
Showing
5 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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
23 changes: 23 additions & 0 deletions
23
sources/RevitDBExplorer/Extensions/Autodesk.Revit.DB/ParameterExtensions.cs
This file contains 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,23 @@ | ||
// (c) Revit Database Explorer https://github.com/NeVeSpl/RevitDBExplorer/blob/main/license.md | ||
|
||
namespace Autodesk.Revit.DB | ||
{ | ||
internal enum ParameterOrgin { Shared, Project, BuiltIn } | ||
|
||
internal static class ParameterExtensions | ||
{ | ||
public static ParameterOrgin GetOrgin(this Parameter parameter) | ||
{ | ||
var result = ParameterOrgin.BuiltIn; | ||
if (parameter.Id.Value() > -1) | ||
{ | ||
result = ParameterOrgin.Project; | ||
} | ||
if (parameter.IsShared) | ||
{ | ||
result = ParameterOrgin.Shared; | ||
} | ||
return result; | ||
} | ||
} | ||
} |
This file contains 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