【Revit API】获取链接模型中构件
2021-04-07 21:24
标签:eui reac collect class active autodesk code font link 话不多说,直接代码 【Revit API】获取链接模型中构件 标签:eui reac collect class active autodesk code font link 原文地址:https://www.cnblogs.com/lovecsharp094/p/9104465.html var doc = commandData.Application.ActiveUIDocument.Document;
FilteredElementCollector linkInstances = new FilteredElementCollector(doc);
linkInstances = linkInstances.WherePasses(new ElementClassFilter(typeof(RevitLinkInstance)));
if (linkInstances != null && linkInstances.Any())
{
foreach (RevitLinkInstance linkIns in linkInstances)
{
Autodesk.Revit.DB.Document linkDoc = linkIns.GetLinkDocument();
if (linkDoc != null)
{
//选取你想要的构件
}
}
}
文章标题:【Revit API】获取链接模型中构件
文章链接:http://soscw.com/index.php/essay/72559.html