整理代码
This commit is contained in:
18
ShrlAlgo.Toolkit.Revit/Helpers/GenericFilter.cs
Normal file
18
ShrlAlgo.Toolkit.Revit/Helpers/GenericFilter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace ShrlAlgo.Toolkit.Revit.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// 类型过滤
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class GenericFilter<T> : ISelectionFilter
|
||||
{
|
||||
public bool AllowElement(Element elem)
|
||||
{
|
||||
return elem is T;
|
||||
}
|
||||
|
||||
public bool AllowReference(Reference reference, XYZ position)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user