Hidding linked elements on active view in general model

Hidding linked elements on active view in general model

Anonymous
Not applicable
236 Views
0 Replies
Message 1 of 1

Hidding linked elements on active view in general model

Anonymous
Not applicable

Hello. I want to try to hide linked elements on general model but nothing happened after transaction.

What I do wrong?

var rvtLinks = new FilteredElementCollector(_doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_RvtLinks).ToElements().First();
var linkdoc = (rvtLinks as RevitLinkInstance).GetLinkDocument();
var collLin = new FilteredElementCollector(linkdoc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElementIds();

 

I tried to do like this:
linkdoc.ActiveView.HideElements(collLin);

And like that:
view.HideElements(collLin);

 

Both way are not work.

0 Likes
237 Views
0 Replies
Replies (0)