Message 1 of 14
Not applicable
01-20-2020
03:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Even though I am able to collect the nested Revit links within a Revit link, and get some of its properties, I am unable to get the nested link's document like I can its parent link.
The python script goes as below:
linkDoc = selectedElem.GetLinkDocument() linkTransform = selectedElem.GetTotalTransform() #Get Nested links nestLinkCollector = list(FilteredElementCollector(linkDoc).OfCategory(BuiltInCategory.OST_RvtLinks).WhereElementIsNotElementType()) linkElemCollector = [] for nl in nestLinkCollector: nestLinkDoc = nl.GetLinkDocument() nestLinkElemCollector = list(FilteredElementCollector(linkDoc).OfCategory(BuiltInCategory.OST_IOSModelGroups).WhereElementIsNotElementType().ToElements())
I can get the nl.Name property, but the nl.GetLinkDocument() call returns null/None. Thus, I am unable to retrieve elements within the nested Revit link as I can in the regular Revit UI.
Any tips would be appreciated.
Solved! Go to Solution.