I am trying to unhide the hided linked document and I am not sure how to do it. I can also not pass the elements Ids of the linked document on the IsolateElementsTemporary() or UnhideElements(). None of these methods works out. I need to use the method IsolateElementsTemporary() to hide other elements on the non linked document.
if intersected_elements_id_list:
#Create a List
intersected_elements_id_iColl = List[ElementId](intersected_elements_id_list)
#Isolate Elements Temporary
view_3d.IsolateElementsTemporary(intersected_elements_id_iColl)
#unhide linkeds documents
view_3d.UnhideElements(cat_elements_2_id)
well I am trying to unhide the linked document (Try unhide 01) or trying to unhide the elements of the linked document (Try unhide 02)
None of then works out.
Thanks in advance
links = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RvtLinks).WhereElementIsNotElementType().ToElements()
for l in links:
linkDoc = l.GetLinkDocument()
collector = FilteredElementCollector(linkDoc)
#filter = ElementCategoryFilter(cat_2)
cat_elements_2 = collector.WhereElementIsNotElementType().ToElements()
#Try to unhide 01
unhide_list = List[ElementId]()
unhide_list.Add(links[0].Id)
test_bool = doc.ActiveView.UnhideElements(unhide_list)
#Try to unhide 02
unhide_list_2 = List[ElementId]()
for ele in cat_elements_2:
unhide_list_2.Add(ele.Id)
test_bool_2 = doc.ActiveView.UnhideElements(unhide_list_2)
Take a very simple project, say a set of walls in a box that is 10x10, save it, and close it. Now link it into a new project. Now copy the link 20 units on the X axis. Notice your project browser only has one link type.
Individual elements can’t be hidden in any case (Revit restriction), nor can the document (as they aren’t an object which has a display). You will need to get the link instances not the link document for this to have a chance.