<?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: suppress warning &amp;gt; new warning with only 'cancel' button? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7178840#M57530</link>
    <description>&lt;P&gt;thanks for the response but I have tried this solution already. When resolvefailures is hit the error window (as described) shows up immediately (before hitting the next codeline). It seems to me the error is defined, but has no implemented error handler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dismissing the whole error window using the windows API seems a buggy and tricky solution to me.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 13:15:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-26T13:15:25Z</dc:date>
    <item>
      <title>suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7169792#M57527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my model there are a few familyinstances with an aligned dimension attached to them. When I rotate one of these familyinstances I receive an error dialog: "Error - cannot be ignored.&amp;nbsp;The References of the highlighted Dimension are no longer parallel." Now I have the option to click 'remove references' or click 'cancel' (the button 'ok' is inaccessible / grayed out). 'Remove references' removes the references and Revit continues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I try to suppress this warning (FailureDefinitionId = BuiltInFailures.DimensionFailures.LinearConstraintNotParallel) by using&amp;nbsp;FailuresAccessor.delete(FailureMessageAccessor) in order to delete the references a new error dialog pops up. It is the same one as &lt;SPAN&gt;"Error - cannot be ignored.&amp;nbsp;The References of the highlighted Dimension are no longer parallel"&amp;nbsp;&lt;/SPAN&gt;only without the button 'remove references'. Because the OK-button is not accessible I can only click 'Cancel' which rolles back previous transactions. Is there a way to get the warning suppressor to act like the 'normal user input'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 06:02:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7169792#M57527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-22T06:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7176937#M57528</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Raymond,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the IFailureProcessor doesn't solve your problem, y&lt;/SPAN&gt;ou may try following approaches to suppress the dialog:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There are several different possible ways to suppress unwanted dialogues in Revit:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2010/08/suppress-unwanted-dialogue.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2010/08/suppress-unwanted-dialogue.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides, we also can use windows API to suppress dialog, it's more powerful:&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;Hope this is helpful.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 14:22:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7176937#M57528</guid>
      <dc:creator>JimJia</dc:creator>
      <dc:date>2017-06-25T14:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7177010#M57529</link>
      <description>&lt;P&gt;this is not a warning, but an error, so it shouldn't be deleted. The error(s) must be Resolved, and the failureProcessingResult must be set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this:&lt;/P&gt;
&lt;PRE&gt;            failuresAccessor.ResolveFailures(fmas);
            if (failuresAccessor.CanCommitPendingTransaction())
            {
                return FailureProcessingResult.ProceedWithCommit;
            }
            if (failuresAccessor.CanRollBackPendingTransaction())
            {
                return FailureProcessingResult.ProceedWithRollBack;
            }
            return FailureProcessingResult.Continue;
&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Jun 2017 15:49:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7177010#M57529</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-06-25T15:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7178840#M57530</link>
      <description>&lt;P&gt;thanks for the response but I have tried this solution already. When resolvefailures is hit the error window (as described) shows up immediately (before hitting the next codeline). It seems to me the error is defined, but has no implemented error handler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dismissing the whole error window using the windows API seems a buggy and tricky solution to me.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 13:15:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7178840#M57530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-26T13:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7179894#M57531</link>
      <description>&lt;P&gt;here is my test code that works Revit 2016 and 2018.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    public class ReferencesNotParallelSwallower : IFailuresPreprocessor
    {
        public FailureProcessingResult PreprocessFailures(FailuresAccessor a)
        {
            bool HasErrors = false;
            IList&amp;lt;FailureMessageAccessor&amp;gt; fmas = a.GetFailureMessages();

            if (fmas.Count == 0)
            {
                return FailureProcessingResult.Continue;
            }

            foreach (FailureMessageAccessor f in fmas)
            {
                FailureSeverity failureSeverity
                      = f.GetSeverity();
                if (failureSeverity == FailureSeverity.Error &amp;amp;&amp;amp; f.GetFailureDefinitionId().Guid.ToString() == "8a9ff20d-fdc2-4f98-87e6-2aa8b71b0c83")
                {
                    HasErrors = true;
                }
            }
            if (!HasErrors)
            {
                return FailureProcessingResult.Continue;
            }
            a.DeleteAllWarnings();
            a.ResolveFailures(fmas);
            return FailureProcessingResult.ProceedWithCommit;
        }
    }
&lt;/PRE&gt;
&lt;P&gt;The most important lines&amp;nbsp;are the last two lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 19:07:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7179894#M57531</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-06-26T19:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7181375#M57532</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Still now joy:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Throw&lt;/SPAN&gt; &lt;SPAN&gt;New&lt;/SPAN&gt; NotImplementedException&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 08:09:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7181375#M57532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-27T08:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: suppress warning &gt; new warning with only 'cancel' button?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7184565#M57533</link>
      <description>&lt;P&gt;this is a different issue altogether.&lt;/P&gt;
&lt;P&gt;you probably have defined a DialogBoxShowing eventhandler, and not written any code in the body.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expect you have a method somewhere that looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;		void ThisApplication_DialogBoxShowing(object sender, DialogBoxShowingEventArgs e)
		{
			throw new NotImplementedException();
		}
&lt;/PRE&gt;
&lt;P&gt;remove the line&amp;nbsp; -- throw new NotImplementedException(); --( or the complete method&amp;nbsp;) .&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 07:55:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/suppress-warning-gt-new-warning-with-only-cancel-button/m-p/7184565#M57533</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-06-28T07:55:22Z</dc:date>
    </item>
  </channel>
</rss>

