<?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: Filters in view template in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234890#M26652</link>
    <description>&lt;P&gt;You can use&amp;nbsp;View.AreGraphicsOverridesAllowed&amp;nbsp;&lt;/P&gt;&lt;P&gt;Likely in one of your projects you have a view that doesn't allow this but it passes your other criteria (depends how you generated 'ViewTemp' collection).&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 15:37:43 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2021-04-13T15:37:43Z</dc:date>
    <item>
      <title>Filters in view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234810#M26650</link>
      <description>&lt;P&gt;I'm trying to get all fiters in view template, and the code below works for some projects, but not all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;exception: the view type does not support visiblity/graphics overrides&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i have found is,&amp;nbsp;&amp;nbsp;view.GetFilters() method will not return the view template in which there's no filters. for instance,&amp;nbsp; i have template 1,2,3, and&amp;nbsp; only the 3 has no filters, when i export to excel , there are only template 1 and 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when all my templates have no filters in them, it returns the exception ---the view type does not support visiblity/graphics overrides&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there any way to check if view template contains filters or not first ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;or maybe better way to handle this exception?&amp;nbsp; &amp;nbsp;Thx&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            foreach (View view in ViewTemp)
            {

                string _Id, _Name, _ClassName, _ViewtempName;
                
                if (view.IsTemplate)
                {
                            ICollection&amp;lt;ElementId&amp;gt; filterIds = view.GetFilters();
                            foreach (ElementId id in filterIds)
                            {
                                Element filter = doc.GetElement(id);
                                _Id = filter.Id.ToString();
                                _Name = filter.Name;
                                _ClassName = filter.GetType().Name;
                                _ViewtempName = view.Name;
                                object[] FilterData = { _Id, _Name, _ClassName, _ViewtempName };
                                FilterDataList.Add(FilterData);
                            }
                }
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:14:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234810#M26650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-13T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filters in view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234857#M26651</link>
      <description>&lt;P&gt;Just an observation while using the&amp;nbsp;the Revit Lookup tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that if a View Template is not associated with a view the .GetFilters() method returns no Filters. As soon i associated the View Template with a view the .GetFilters() method works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This behavior seems odd. Again, I havent tested this in code. Only using Revit Lookup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the exporting goes im not sure.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:28:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234857#M26651</guid>
      <dc:creator>TheRealChrisHildebran</dc:creator>
      <dc:date>2021-04-13T15:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filters in view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234890#M26652</link>
      <description>&lt;P&gt;You can use&amp;nbsp;View.AreGraphicsOverridesAllowed&amp;nbsp;&lt;/P&gt;&lt;P&gt;Likely in one of your projects you have a view that doesn't allow this but it passes your other criteria (depends how you generated 'ViewTemp' collection).&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:37:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234890#M26652</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-04-13T15:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filters in view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234891#M26653</link>
      <description>&lt;P&gt;Thanks for your reply. it works even when some of vues don't have view template, it also works even some view templates have no filters in it. but it throws an exception when all view templates have no filters....&lt;/P&gt;&lt;P&gt;i know it's weird when all view templates have no filters..but this is not something i can decide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10234891#M26653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-13T15:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filters in view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10235009#M26654</link>
      <description>&lt;P&gt;O Gee, that's where the problem is ... and i thought it was my filters problem. life savor. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 16:06:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/filters-in-view-template/m-p/10235009#M26654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-13T16:06:15Z</dc:date>
    </item>
  </channel>
</rss>

