<?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: SEHException on CheckoutElements? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12454982#M67483</link>
    <description>&lt;P&gt;Has there been fix to this?&amp;nbsp; Or a workaround discovered?&amp;nbsp; We have a customer experiencing a similar error, using Revit 2024, when our Addin calls Autodesk.Revit.DB.Definitions.Create().&amp;nbsp; But no luck reproducing internally so far.&amp;nbsp; API version 24.1.10.25.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2023 04:04:00 GMT</pubDate>
    <dc:creator>MattKincaid</dc:creator>
    <dc:date>2023-12-21T04:04:00Z</dc:date>
    <item>
      <title>SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6047839#M67476</link>
      <description>&lt;P&gt;Why might WorksharingUtils.CheckOutElements() throw System.Runtime.InteropServices.SEHException: {"External component has thrown an exception."}&amp;nbsp; I think this has something to do with going back and forth between managed and non-managed so this may be a foolish thought but the documentation doesn't mention this exception as possibly being thrown from CheckoutElements().&amp;nbsp; (I confess that SEH isn't a strong suit in my .NET knowledge)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;I've run right up against the fact that updaters are called on modified elements BEFORE Revit determines that the element cannot be edited because it is updated in the central model.&amp;nbsp; So my updaters are firing and updating my lists but the change never actually happens so things go haywire and my lists are off by an element count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In an attempt to work around this issue, I thought it might be smart to check to see if the element could be checked out and if so, was its model update status suitable for editing.&amp;nbsp; However, when I try to check this element out, CheckoutElements() is throwing a structured exception handler exception&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.Runtime.InteropServices.SEHException occurred&lt;BR /&gt;&amp;nbsp; HResult=-2147467259&lt;BR /&gt;&amp;nbsp; Message=External component has thrown an exception.&lt;BR /&gt;&amp;nbsp; Source=RevitDBAPI&lt;BR /&gt;&amp;nbsp; ErrorCode=-2147467259&lt;BR /&gt;&amp;nbsp; StackTrace:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at WorksharingUtils.checkoutElements(SetReturn&amp;lt;ElementId\,std::less&amp;lt;ElementId&amp;gt;\,tnallc&amp;lt;ElementId&amp;gt; &amp;gt;* , ADocument* , Set&amp;lt;ElementId\,std::less&amp;lt;ElementId&amp;gt;\,tnallc&amp;lt;ElementId&amp;gt; &amp;gt;* )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Autodesk.Revit.Proxy.DB.WorksharingUtilsProxy.CheckoutElements(DocumentProxy document, ICollection`1 elementsToCheckout)&lt;BR /&gt;&amp;nbsp; InnerException:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this could be related to running two users in one Revit session, or could be related to attempting to checkout elements in an updater?&amp;nbsp; Just need some ideas on where to start figuring this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm catching the exception but don't know what else to do other than determine that it can't be edited so I'm sometimes updating my internal lists and sometimes not...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there are no ideas, I'll work on setting up a minimally reproducible case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 17:25:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6047839#M67476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-19T17:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6047890#M67477</link>
      <description>Update:&lt;BR /&gt;Calling Checkout Elements seems to be throwing this if the element no longer exists in the model.</description>
      <pubDate>Fri, 19 Feb 2016 17:50:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6047890#M67477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-19T17:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6048158#M67478</link>
      <description>Update 2: put in a check to see that I can get the element from the model prior to attempting to check it out and the element does actually still exist in the model.&lt;BR /&gt;&lt;BR /&gt;I'm going to work on putting together a minimally reproducible case and see what I can figure out. Will keep this updated.</description>
      <pubDate>Fri, 19 Feb 2016 19:49:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6048158#M67478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-19T19:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049365#M67479</link>
      <description>&lt;P&gt;Ken,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SEHExceptions are always indications of a bug in Revit. Ir may not be Revit self&amp;nbsp;(but an external app) causing the problem, but Revit should be able recover from it and should not let any exception to be re-thrown as an&amp;nbsp;&lt;SPAN&gt;SEHExceptions. Please connect with Jeremy and&amp;nbsp;ask him to file a bug report. A reproducible sample would&amp;nbsp;help&amp;nbsp;tremendously, of course. If you can, add you code as macro into the document (simplified as much as possible) you test it on and upload the document to us. That always speeds up the process&amp;nbsp;of us investigating it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and sorry for the inconvenience.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2016 13:25:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049365#M67479</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2016-02-21T13:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049368#M67480</link>
      <description>Top of the morning to you!&lt;BR /&gt;&lt;BR /&gt;Unfortunately I tried the most simple reproduction and it didn't work so&lt;BR /&gt;I'm working on the next step up in complexity to see if I can reproduce it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for the information and I'll do my best to make a minimally&lt;BR /&gt;reproducible case.&lt;BR /&gt;&lt;BR /&gt;Thanks also for reading through these.&lt;BR /&gt;&lt;BR /&gt;-Ken</description>
      <pubDate>Sun, 21 Feb 2016 13:32:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049368#M67480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-21T13:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049533#M67481</link>
      <description>&lt;P&gt;Got it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is the minimal reproducible case.&amp;nbsp; The app consists of two updaters, each updater targets a different change priority but both target the same change type.&amp;nbsp; The second updater (changePriority.Annotations as opposed to updater 1 with change priority.Structure) attempts to checkout the elements again and throws.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reproduction (assuming test application is installed/setup):&lt;/P&gt;&lt;P&gt;1. Create new revit file from Structural Template (most likley any template. will work)&lt;/P&gt;&lt;P&gt;2. Create an element (I used a Beam)&lt;/P&gt;&lt;P&gt;3. make this file a workshared file, save it, then sync with central relinquising all, then close central&lt;/P&gt;&lt;P&gt;4. change user name, open central with "create new local" option checked&lt;/P&gt;&lt;P&gt;5. Attempt to change the length of the beam -&amp;gt; Second updater throws&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>Sun, 21 Feb 2016 18:55:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6049533#M67481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-21T18:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6052098#M67482</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Ken,&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 and reproducible case.&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 logged the issue &lt;U&gt;&lt;STRONG&gt;REVIT-86309&lt;/STRONG&gt;&lt;/U&gt; [SEHException on CheckoutElements -- 11536135] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.&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;This issue is important to me. What can I do to help?&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;This issue needs to be assessed by our engineering team, and prioritised against all of the other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Impact on your application and/or your development.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;The number of users affected.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;The potential revenue impact to you.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;The potential revenue impact to Autodesk.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Realistic timescale over which a fix would help you.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 10:41:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/6052098#M67482</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2016-02-23T10:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12454982#M67483</link>
      <description>&lt;P&gt;Has there been fix to this?&amp;nbsp; Or a workaround discovered?&amp;nbsp; We have a customer experiencing a similar error, using Revit 2024, when our Addin calls Autodesk.Revit.DB.Definitions.Create().&amp;nbsp; But no luck reproducing internally so far.&amp;nbsp; API version 24.1.10.25.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 04:04:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12454982#M67483</guid>
      <dc:creator>MattKincaid</dc:creator>
      <dc:date>2023-12-21T04:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12455483#M67484</link>
      <description>&lt;P&gt;Tricky to say what "this" exactly refers to. The issue&amp;nbsp;REVIT-87154 [SEHException on CheckoutElements -- 11536135] was closed as fixed in 2016, and the issue described there thus resolved from Revit 2018 onwards. Maybe it is time to submit a completely new thread, with a new issue, preferably with a complete minimal reproducible case to analyse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 10:37:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12455483#M67484</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2023-12-21T10:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12455957#M67485</link>
      <description>&lt;P&gt;I was wondering whether there was a way to prevent the Revit API from re-throwing SEHException.&amp;nbsp; Will open a new thread if I discover a way to reproduce the error minimally.&amp;nbsp; Appreciate the update.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:54:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12455957#M67485</guid>
      <dc:creator>MattKincaid</dc:creator>
      <dc:date>2023-12-21T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12456600#M67486</link>
      <description>&lt;P&gt;Update: It turned out to be an Anti-Virus program causing interference.&amp;nbsp; Disabling AV solved it.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 19:32:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12456600#M67486</guid>
      <dc:creator>MattKincaid</dc:creator>
      <dc:date>2023-12-21T19:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: SEHException on CheckoutElements?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12457314#M67487</link>
      <description>&lt;P&gt;Cool! Congratulations on solving!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 04:50:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sehexception-on-checkoutelements/m-p/12457314#M67487</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2023-12-22T04:50:51Z</dc:date>
    </item>
  </channel>
</rss>

