
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can get elements of type wall using this code snippet. But I need to get all types of element from link document. Can anyone please help?
foreach (Document linkedDoc in uiApp.Application.Documents)
{
if (element.Name.Contains(linkedDoc.Title))
{
FilteredElementCollector linkElementCollector = new FilteredElementCollector(linkedDoc);
IList<Element> linkedWalls = linkElementCollector.OfClass(typeof(Wall)).ToElements(); // <------------------Filter applied here.
foreach (Element e in linkElementCollector)
{
}
}
}
Many thanks.
Solved! Go to Solution.