-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Adaptive component Instance Util (#27)
* Added Adaptive component Instance Util * Considering Adaptive Family only Feature
- Loading branch information
1 parent
d24e482
commit 51e3ca2
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
sources/RevitDBExplorer/Domain/DataModel/MemberTemplates/FamilyInstance_Templates.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,29 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Autodesk.Revit.DB; | ||
using RevitDBExplorer.Domain.DataModel.MemberTemplates.Base; | ||
using RevitDBExplorer.Domain.DataModel.Streams; | ||
using RevitDBExplorer.Domain.DataModel.Streams.Base; | ||
|
||
// (c) Revit Database Explorer https://github.com/NeVeSpl/RevitDBExplorer/blob/main/license.md | ||
|
||
namespace RevitDBExplorer.Domain.DataModel.MemberTemplates | ||
{ | ||
internal class FamilyInstance_Templates : IHaveMemberTemplates | ||
{ | ||
private static readonly IEnumerable<ISnoopableMemberTemplate> templates = Enumerable.Empty<ISnoopableMemberTemplate>(); | ||
|
||
static FamilyInstance_Templates() | ||
{ | ||
templates = new ISnoopableMemberTemplate[] | ||
{ | ||
SnoopableMemberTemplate<FamilyInstance>.Create((doc, target) => AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(target),canBeUsed: (x)=> AdaptiveComponentInstanceUtils.IsAdaptiveComponentInstance(x) , kind: MemberKind.AsArgument), | ||
}; | ||
} | ||
|
||
public IEnumerable<ISnoopableMemberTemplate> GetTemplates() | ||
{ | ||
return templates; | ||
} | ||
} | ||
} |