<?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: Possible issue with FilteredElementCollector for dependent views in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8640915#M43900</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Dear James,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Indeed, you would not want that happening in your add-ins or production code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest creating unit tests to ensure that all important functionality always works as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am sorry to say that we cannot really expect the development team to be able to analyse this in any depth without producing a minimal reproducible case for them to look at:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe it was a one-off glitch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please let us know if you discover anything that might help clarify the situation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2019 19:13:35 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2019-03-06T19:13:35Z</dc:date>
    <item>
      <title>Possible issue with FilteredElementCollector for dependent views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8637773#M43899</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I usually develop my tools in C#, but yesterday I was in a hurry and threw together a quick Dynamo via Python to execute my goal. The goal of the tool was to search through a particular sheet (and it's view ports) to find all revision clouds in a certain revision. After those clouds had been collected, it would simply change the revision for each of the clouds... a simple revision mover. This worked for most of my effort... however, on the last sheet in process, I hit run, and it not only decided to regenerate graphics for the entire model, but also collected all clouds throughout the model. So far, &lt;U&gt;&lt;STRONG&gt;I have not been able to replicate this issue&lt;/STRONG&gt;&lt;STRONG&gt;... even with the same view/sheet&lt;/STRONG&gt;&lt;/U&gt;. My guess is that the FilteredElementCollector asked the Revit document for all elements in the view, but something told the model it needed a full graphics regeneration at the same moment, and the FilteredElementCollector simply accepted all returned elements from the regeneration as part of it's search pool instead of confirming that the regeneration occurred only within the context of the view in question. The result was an &lt;U&gt;&lt;STRONG&gt;unexpected modification to 300+ rev clouds&lt;/STRONG&gt;&lt;/U&gt; instead the ~12 that should have been modified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do &lt;STRONG&gt;NOT&lt;/STRONG&gt; want this issue occurring on my addins... as some of my addins rely heavily on graphics collection.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Only ~12 Clouds should have been modified!" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/610162iC11C4821C94064B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="img 1.jpg" alt="Only ~12 Clouds should have been modified!" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Only ~12 Clouds should have been modified!&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Img 2.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/610163i7570EC28FF6854F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Img 2.jpg" alt="Img 2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In anticipation of some questions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- All viewports on the sheet were dependents and were cropped down... so nothing should have required graphics regeneration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- All worksets are off&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- Dynamo Python Code, Journal File Snippet, and Image of View attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- The TaskDialog in my Dynamo appears at line 963 in the Journal File Snippet... identifying the 358 clouds that had been modified instead of the ~12 that should have been modified.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 16:50:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8637773#M43899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-05T16:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Possible issue with FilteredElementCollector for dependent views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8640915#M43900</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear James,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Indeed, you would not want that happening in your add-ins or production code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest creating unit tests to ensure that all important functionality always works as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am sorry to say that we cannot really expect the development team to be able to analyse this in any depth without producing a minimal reproducible case for them to look at:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe it was a one-off glitch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please let us know if you discover anything that might help clarify the situation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 19:13:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8640915#M43900</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-03-06T19:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Possible issue with FilteredElementCollector for dependent views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8640952#M43901</link>
      <description>&lt;P&gt;Okay, Thank You for you response.&lt;/P&gt;
&lt;P&gt;I was really just hoping someone who knows enough about exactly how the filtered element collector works would see this post and potentially realize a vulnerability in it's design.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though the original issue occurred in a fairly well controlled environment, I have STILL not been able to reproduce it. I will continue testing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 19:24:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/possible-issue-with-filteredelementcollector-for-dependent-views/m-p/8640952#M43901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-06T19:24:09Z</dc:date>
    </item>
  </channel>
</rss>

