<?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: General warning swallower in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6591748#M62762</link>
    <description>&lt;P&gt;Thank you very much, Adam and Wolfgang!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I summarised this thread here on The Building Coder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2016/09/warning-swallower-and-roomedit3d-viewer-extension.html#2" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2016/09/warning-swallower-and-roomedit3d-viewer-extension.html#2&lt;/A&gt;&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>Thu, 29 Sep 2016 12:00:36 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2016-09-29T12:00:36Z</dc:date>
    <item>
      <title>General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6586381#M62757</link>
      <description>&lt;P&gt;In my solution I'm opening a lot of families from within a project. Sometimes some popups appear during opening a family. I enclosed the opening process inside a transaction in which I handle warnings via&amp;nbsp;IFailuresPreprocessor. I noticed that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;about 90% warnings I can suppres with the following:&lt;/P&gt;&lt;PRE&gt;FailuresAccessor a;
a.DeleteAllWarnings();
return FailureProcessingResult.Continue;&lt;/PRE&gt;&lt;P&gt;But the remaining 10% won't get suppressed with such treatment, they do get suppressed with:&lt;/P&gt;&lt;PRE&gt;FailuresAccessor a;
IList&amp;lt;FailureMessageAccessor&amp;gt; failures = a.GetFailureMessages();
a.ResolveFailures(failures);
return FailureProcessingResult.ProceedWithCommit;&lt;/PRE&gt;&lt;P&gt;Is there a general way to check with what kind of treatment current warning can&amp;nbsp;get suppressed? I don't want to go into a switch case block because the warnings are really various and it'd take ages before I covered them all. Another issue is that it doesn't matter so much how I treat the warnings because I don't resave the families in my solution - I just close them without saving.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:04:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6586381#M62757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-27T09:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6586665#M62758</link>
      <description>&lt;P&gt;Dear Adam,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your cool query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not aware of any generic warning swallower within the Revit API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution you have already seems pretty good to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For something yet more generic, all I can suggest is a Windows dialogue handler:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2009/10/dismiss-dialogue-using-windows-api.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2009/10/dismiss-dialogue-using-windows-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/JtClicker" target="_blank"&gt;https://github.com/jeremytammik/JtClicker&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Building Coder provides an entire topic group on the subject of&amp;nbsp;Detecting and Handling Dialogues and Failures:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.32" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.32&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know how you end up resolving this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sure your solution will come in handy for others also.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 12:02:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6586665#M62758</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2016-09-27T12:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6587925#M62759</link>
      <description>&lt;P&gt;This works fine for me.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/revit-api-forum/supressing-warning-pop-ups/td-p/4764741" target="_blank"&gt;http://forums.autodesk.com/t5/revit-api-forum/supressing-warning-pop-ups/td-p/4764741&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wolfgang&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 20:10:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6587925#M62759</guid>
      <dc:creator>Wolfgang.B.Weh</dc:creator>
      <dc:date>2016-09-27T20:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6587983#M62760</link>
      <description>&lt;P&gt;Cool. Since you say so, I added it to the topic group:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.32" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.32&lt;/A&gt;&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, 27 Sep 2016 20:37:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6587983#M62760</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2016-09-27T20:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6589045#M62761</link>
      <description>&lt;P&gt;Thank you gents &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Indeed the Severity is&amp;nbsp;what I was looking for, my solution seems to be working&amp;nbsp;fine now. The code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public FailureProcessingResult PreprocessFailures(FailuresAccessor a)
{
	IList&amp;lt;FailureMessageAccessor&amp;gt; failures = a.GetFailureMessages();
	
	foreach(FailureMessageAccessor f in failures)
	{
		FailureSeverity fseverity = a.GetSeverity();
		if(fseverity == FailureSeverity.Warning) a.DeleteWarning(f);
		else
		{
			a.ResolveFailure(f);
			return FailureProcessingResult.ProceedWithCommit;
		}
	}
	return FailureProcessingResult.Continue;
}&lt;/PRE&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 11:24:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6589045#M62761</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-28T11:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: General warning swallower</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6591748#M62762</link>
      <description>&lt;P&gt;Thank you very much, Adam and Wolfgang!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I summarised this thread here on The Building Coder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2016/09/warning-swallower-and-roomedit3d-viewer-extension.html#2" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2016/09/warning-swallower-and-roomedit3d-viewer-extension.html#2&lt;/A&gt;&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>Thu, 29 Sep 2016 12:00:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/general-warning-swallower/m-p/6591748#M62762</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2016-09-29T12:00:36Z</dc:date>
    </item>
  </channel>
</rss>

