//取得指定名字的平面
public static ReferencePlane GetRefPlaneByName(Document doc, string name = "")
{
try
{
FilteredElementCollector collector = new FilteredElementCollector(doc);
collector.OfClass(typeof(ReferencePlane));
FilteredElementIterator eit = collector.GetElementIterator();
while (eit.MoveNext())
{
ReferencePlane plan = eit.Current as ReferencePlane;
if (plan.Name.Equals(name))
{
return plan;
}
}
}
catch (System.Exception)
{
}
return null;
}
REVIT二次开发取得指定名字的平面
最新推荐文章于 2024-09-30 10:13:29 发布