<?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: Accessing Warning List in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3935993#M79396</link>
    <description>&lt;P&gt;Please refer to the FailureProcessing event and related classes (FailuresAccessor, FailureResolution, etc.) in the API help.&lt;/P&gt;
&lt;P&gt;For transactions own by your application, you can also pre-screen the list of failures using a FailuresPreprocessor. Please refer to the documentation for Transaction class, specifically to FailureHandlingOptions.SetFailuresPreprocessor&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;Arnošt Löbel&lt;/P&gt;
&lt;P&gt;Autodesk Revit R&amp;amp;D&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2013 19:43:03 GMT</pubDate>
    <dc:creator>arnostlobel</dc:creator>
    <dc:date>2013-05-24T19:43:03Z</dc:date>
    <item>
      <title>Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3925178#M79394</link>
      <description>&lt;P&gt;Is it possible to access this warning list using API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-05-16_0905.png" border="0" src="https://forums.autodesk.com/t5/image/serverpage/image-id/52660i6B72EF6236963089/image-size/original?v=mpbl-1&amp;amp;px=-1" title="2013-05-16_0905.png" align="middle" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 15:07:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3925178#M79394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-16T15:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3932705#M79395</link>
      <description>&lt;P&gt;Unfortunately it's not. &amp;nbsp;I've searched for it in the API and at AU last year confirmed that it isn't possible at the Revit API Roundtable. &amp;nbsp;The best you can do it manually export the warnings list to html and create an add-in that reads that html file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also read through the What's New in the Revit 2014 API and didn't see anything mentioning it either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can login to the AU site, I think it's mentioned in the class notes under 'Additional Class Materials'.&lt;/P&gt;&lt;P&gt;&lt;A href="http://au.autodesk.com/?nd=class&amp;amp;session_id=10416" target="_blank"&gt;http://au.autodesk.com/?nd=class&amp;amp;session_id=10416&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 19:29:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3932705#M79395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-22T19:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3935993#M79396</link>
      <description>&lt;P&gt;Please refer to the FailureProcessing event and related classes (FailuresAccessor, FailureResolution, etc.) in the API help.&lt;/P&gt;
&lt;P&gt;For transactions own by your application, you can also pre-screen the list of failures using a FailuresPreprocessor. Please refer to the documentation for Transaction class, specifically to FailureHandlingOptions.SetFailuresPreprocessor&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;Arnošt Löbel&lt;/P&gt;
&lt;P&gt;Autodesk Revit R&amp;amp;D&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2013 19:43:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3935993#M79396</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-05-24T19:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3936001#M79397</link>
      <description>&lt;P&gt;Thanks Arnost.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately we're trying to access warnings that occurred in the past and are stored in the document.&amp;nbsp; These warnings or failures could have fired weeks ago and while the FailureProcessing event and FailuresPreprocessor assist with warnings your add-in may generate, it doesn't provide access to a list of failures that occurred in the past.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2013 19:51:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3936001#M79397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-24T19:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3940195#M79398</link>
      <description>&lt;P&gt;Hello Josef,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the clarification. Indeed it is something different than what I thought it was, and we do not currently have an API for accessing past warnings. However, there may be a viable workaround that is probably worth exploring. Now, I have not tried it yet, but there is a “Review warnings” command somewhere in Revit which, when invoked, shows all those old warnings if any. Actually, how it does it is interesting – it does not just grab and show the warnings; instead it takes the warnings, posts them again, and let the standard failure handling mechanism do the displaying. So, it seems you might be able to get them after all. You would need to a) Write an event handler for the failure processing event. The event should be raised after the failures are posted and before the command’s transaction is finished. And you would also need to b) Programmatically invoke the “Review Warnings” command. I do not actually know if that command is one of those that could be invoked via the API, but chances are it is (I am talking R2014, of course). You may give it a try and see if it works like I expect it to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that does not work at all, and if there is more interest in the future, we will consider creating a specific API for it. (It had been considered before, but did not get a lot of attention.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arnošt Löbel&lt;/P&gt;
&lt;P&gt;Autodesk Revit R&amp;amp;D&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 17:27:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3940195#M79398</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-05-28T17:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3940340#M79399</link>
      <description>&lt;P&gt;I am reading this: &lt;A href="http://wikihelp.autodesk.com/Revit/enu/2014/Help/3665-Developers/0135-Advanced135/0153-Commands" target="_blank"&gt;http://wikihelp.autodesk.com/Revit/enu/2014/Help/3665-Developers/0135-Advanced135/0153-Commands&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It sounds like a command may be posted only after the API application execution is completed. So if this is the case, it will not be possible to embed it inside a transaction. Or am I missing something here?&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 19:42:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3940340#M79399</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-28T19:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3941772#M79400</link>
      <description>&lt;P&gt;A Revit command is posted during API execution, but, yes, it should be the last thing done and it is actuallyy executed only after the external command completes its execution.&lt;/P&gt;
&lt;P&gt;You may not post a command from inside your transaction, but you should not need to, if I understand correctly what you try to achieve. You set up a failure handler, and you post the command. When the command gets executed, it'll start a transaction during which the old warnings are re-posted, upon which time your failure handler gets invoked. From the handler you can collect all failures using a failure accessor. Isn’t that what you wanted?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arnošt Löbel&lt;/P&gt;
&lt;P&gt;Autodesk Revit R&amp;amp;D&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 00:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3941772#M79400</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-05-30T00:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3942352#M79401</link>
      <description>&lt;P&gt;Thanks for the explanation, I think I get it now. I'll give it a shot.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 14:09:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/3942352#M79401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-30T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5637633#M79402</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Were you able to use Arnost's suggestion to read out the current Revit warnings?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 23:27:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5637633#M79402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-15T23:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5942805#M79403</link>
      <description>&lt;P&gt;hi Arnošt, i tried your suggestion, and it's almost working except that i cannot make retrievd info (i.e. element ids) from&amp;nbsp;&lt;SPAN&gt;failure accessor to do meaningful work, for instance, isolate or even delete some elements, i tried both in&amp;nbsp;failure processing mode&amp;nbsp;and in current command&amp;nbsp;scope&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) in&amp;nbsp;&lt;SPAN&gt;failure processing mode,&amp;nbsp;&lt;/SPAN&gt;document changes&amp;nbsp;is&amp;nbsp;prohibited&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2)&amp;nbsp;&lt;SPAN&gt;in current command scope, posted command is&amp;nbsp;executed only after the external command completes its execution, so no way to&amp;nbsp;use "future"&amp;nbsp;retrievd info for "present" use, isn't it? any workaround?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;see below code snippet for your info&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;public class Command : IExternalCommand&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;List&amp;lt;ICollection&amp;lt;ElementId&amp;gt;&amp;gt; lst = new List&amp;lt;ICollection&amp;lt;ElementId&amp;gt;&amp;gt;();&lt;BR /&gt;&amp;nbsp; &amp;nbsp;public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app.Application.FailuresProcessing += new EventHandler&amp;lt;FailuresProcessingEventArgs&amp;gt;(FailuresProcessing);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RevitCommandId id = RevitCommandId.LookupPostableCommandId(PostableCommand.ReviewWarnings);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AddInCommandBinding binding = app.CreateAddInCommandBinding(id);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app.PostCommand(id);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TaskDialog.Show("testing", lst.Count.ToString()); // this will always return default value 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ... // do some document changes based on these element ids&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return Result.Succeeded;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;private void FailuresProcessing(object sender, FailuresProcessingEventArgs e)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 03:14:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5942805#M79403</guid>
      <dc:creator>Ning_Zhou</dc:creator>
      <dc:date>2015-12-09T03:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5943934#M79404</link>
      <description>Ning_Zhou,&lt;BR /&gt;&lt;BR /&gt;I am very sorry, but I have currently limited time to devote answering questions and analyzing problem in this API forum, or any forum for that matter. I am afraid I am backed up until Christmas, and I expect my presence will be spotty a couple of weeks after the holiday break, as we are going to move from one office to another in Boston.&lt;BR /&gt;&lt;BR /&gt;However, I have notice something interesting in you recent post and I want to comment on it:&lt;BR /&gt;&lt;BR /&gt;Posting a command is supposed to be the last think an application should do in a current context. For example, if posting happens in an External command, it is supposed to be on the last time just before the return statement. Ideally, the code should already be out of any transaction. There is no point of doing anything after a posting command, since posting is asynchronous and will be executed only after returning from the external command. Basically, the posted command is though as a continuation of your external command.&lt;BR /&gt;&lt;BR /&gt;Thanks. Please keep this thread alive so it bubbles up in my queue and I do not lose a track it.&lt;BR /&gt;&lt;BR /&gt;Arnošt</description>
      <pubDate>Wed, 09 Dec 2015 16:37:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5943934#M79404</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2015-12-09T16:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5944845#M79405</link>
      <description>got it Arnošt, thanks and Merry Christmas in advance!</description>
      <pubDate>Thu, 10 Dec 2015 01:31:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/5944845#M79405</guid>
      <dc:creator>Ning_Zhou</dc:creator>
      <dc:date>2015-12-10T01:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Warning List</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/6572334#M79406</link>
      <description>Has anyone had any success with this technique?</description>
      <pubDate>Tue, 20 Sep 2016 06:29:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-warning-list/m-p/6572334#M79406</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2016-09-20T06:29:04Z</dc:date>
    </item>
  </channel>
</rss>

