<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Filter for elements hidden in a view in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5502031#M73994</link>
    <description>&lt;P&gt;Jeremy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing an add-in that finds all the elements that have been "hidden by element"&amp;nbsp;in the active view.&lt;/P&gt;&lt;P&gt;We have a few user that are prone to hide elements in view and this is a pain to sort out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My&amp;nbsp;code &amp;nbsp;scans the model and if anything is found presents a dialog which shows what is hidden and lets the user "unhide" selectively.&lt;/P&gt;&lt;P&gt;The code that I have works ok but iterates over everything in the model to build a list of hidden elements.&lt;/P&gt;&lt;P&gt;I was hoping to use something like this to speed things up as your blog encourages us to filter not iterate over everyting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; Rule1 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;FONT size="2"&gt; FilterRule = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;FONT size="2"&gt; FilterStringRule(pvp, Eval, RuleString, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Filter_Param = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementParameterFilter(Rule1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;' Create a logic And filter for category and parameter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Filter_Select &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; LogicalAndFilter = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; LogicalAndFilter(Filter_Cat, Filter_Param)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;CollectorDoc.WherePasses(Filter_Select).WhereElementIsNotElementType.ToElements()&lt;/P&gt;&lt;P&gt;Iter_Element = CollectorDoc.GetElementIdIterator()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I can't figure out how to get the e.ishidden(viewname) into the above. There doesn't seem to be a built in parameter that I can use. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Sorry don't think your example helps, and I have been looking at your blog (which is great) trying to find some help.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Feb 2015 17:32:53 GMT</pubDate>
    <dc:creator>PaulCollins7972</dc:creator>
    <dc:date>2015-02-10T17:32:53Z</dc:date>
    <item>
      <title>Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5501653#M73992</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can someone advise on how to construct a filter that will find elements that have been "hidden by element" in a view?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some working code that finds all elements in the current design option and then iterates through each to find which are hidden, but there must be a way to construct an element parameter&amp;nbsp;filter that will be quicker but I can't figure out how to build&amp;nbsp;using the&amp;nbsp;element.ishidden(vw) parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; doc &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;FONT size="2"&gt; Autodesk.Revit.DB.Document = commandData.Application.ActiveUIDocument.Document&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; vw &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Autodesk.Revit.DB.View = doc.ActiveView&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; CollectorView &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;FONT size="2"&gt; FilteredElementCollector = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;FONT size="2"&gt; FilteredElementCollector(doc)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; activeOptId &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementId = Autodesk.Revit.DB.DesignOption.GetActiveDesignOptionId(doc)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'create an ElementDesignOption filter&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Filter_Option &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementDesignOptionFilter(activeOptId)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;CollectorView.WherePasses(Filter_Option)&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Iter_Elements &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; IEnumerator = CollectorView.GetElementIterator&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'iterate through all the elements to find hidden elements&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Do&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;While&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Iter_Elements.MoveNext()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Not&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; (Iter_Elements.Current) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Is&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Element = Iter_Elements.Current&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e.CanBeHidden(vw) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e.Id &amp;lt;&amp;gt; vw.Id &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'don't include the view border if hidden&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e.IsHidden(vw) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;&lt;FONT size="2"&gt;Thanks!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 14:12:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5501653#M73992</guid>
      <dc:creator>PaulCollins7972</dc:creator>
      <dc:date>2015-02-10T14:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5501906#M73993</link>
      <description>&lt;P&gt;Does this help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/10/is-a-given-element-hidden-in-a-view.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/10/is-a-given-element-hidden-in-a-view.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope so!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know how it goes and how you can make use of ti.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 16:27:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5501906#M73993</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-02-10T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5502031#M73994</link>
      <description>&lt;P&gt;Jeremy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing an add-in that finds all the elements that have been "hidden by element"&amp;nbsp;in the active view.&lt;/P&gt;&lt;P&gt;We have a few user that are prone to hide elements in view and this is a pain to sort out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My&amp;nbsp;code &amp;nbsp;scans the model and if anything is found presents a dialog which shows what is hidden and lets the user "unhide" selectively.&lt;/P&gt;&lt;P&gt;The code that I have works ok but iterates over everything in the model to build a list of hidden elements.&lt;/P&gt;&lt;P&gt;I was hoping to use something like this to speed things up as your blog encourages us to filter not iterate over everyting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; Rule1 &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;FONT size="2"&gt; FilterRule = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;FONT size="2"&gt; FilterStringRule(pvp, Eval, RuleString, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Filter_Param = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementParameterFilter(Rule1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;' Create a logic And filter for category and parameter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Filter_Select &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; LogicalAndFilter = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; LogicalAndFilter(Filter_Cat, Filter_Param)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;CollectorDoc.WherePasses(Filter_Select).WhereElementIsNotElementType.ToElements()&lt;/P&gt;&lt;P&gt;Iter_Element = CollectorDoc.GetElementIdIterator()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I can't figure out how to get the e.ishidden(viewname) into the above. There doesn't seem to be a built in parameter that I can use. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Sorry don't think your example helps, and I have been looking at your blog (which is great) trying to find some help.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 17:32:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5502031#M73994</guid>
      <dc:creator>PaulCollins7972</dc:creator>
      <dc:date>2015-02-10T17:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5508203#M73995</link>
      <description>&lt;P&gt;Hi Paul.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use linq, something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ICollection&amp;lt;ElementId&amp;gt; collector= new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).WhereElementIsNotElementType()
.Where(x =&amp;gt;x.IsHidden(Vy)).
Select(x =&amp;gt; x.Id).Cast&amp;lt;ElementId&amp;gt;().ToList();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good Luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Martin&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2015 08:45:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5508203#M73995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-16T08:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5508294#M73996</link>
      <description>&lt;P&gt;Thanks Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's just what I was looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2015 10:53:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5508294#M73996</guid>
      <dc:creator>PaulCollins7972</dc:creator>
      <dc:date>2015-02-16T10:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560228#M73997</link>
      <description>&lt;P&gt;Hello Paul,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a look at your code but for some reason I am not being able to run it appropiately. Would it be much to ask if you cold post your solution in this post?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really appreciate it as it would be a very useful tool for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 10:16:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560228#M73997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-27T10:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560341#M73998</link>
      <description>&lt;P&gt;Hi Luis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I ended up with. It finds all elements in the active design option and uses LINQ to see if they are hidden by element in the current view.&lt;/P&gt;&lt;P&gt;My code then loads these into a ListView. When the user chooses an item in the list it is temporarily unhidden as a preview, when the dialog is OK'd then all selected elements are unhidden. I had to check for worksets and phases to see if each element should be visible in the current view, view filters still to do!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; doc &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;FONT size="2"&gt; Autodesk.Revit.DB.Document = commandData.Application.ActiveUIDocument.Document&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; vw &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Autodesk.Revit.DB.View = doc.ActiveView&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; collector &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; FilteredElementCollector = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; FilteredElementCollector(doc)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; activeOptId &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementId = Autodesk.Revit.DB.DesignOption.GetActiveDesignOptionId(doc)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'create an ElementDesignOption filter&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Filter_Option &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; ElementDesignOptionFilter(activeOptId)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;collector.WherePasses(Filter_Option)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'create a LINQ query&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; query = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;From&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; item &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Element &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;In&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; collector &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; item.IsHidden(vw) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Select&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; item&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;For&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Each&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Element &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;In&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; query&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; e.IsHidden(vw) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;&lt;FONT size="2"&gt;Works OK in 2013, 2014 and 2015&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;&lt;FONT size="2"&gt;Hope that is useful.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;&lt;FONT size="2"&gt;Paul&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 11:34:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560341#M73998</guid>
      <dc:creator>PaulCollins7972</dc:creator>
      <dc:date>2015-03-27T11:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for elements hidden in a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560499#M73999</link>
      <description>&lt;P&gt;Thank you Paul!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 12:53:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filter-for-elements-hidden-in-a-view/m-p/5560499#M73999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-27T12:53:44Z</dc:date>
    </item>
  </channel>
</rss>

