<?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: Start transaction not working with Revit 2014 in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877841#M79558</link>
    <description>&lt;P&gt;It is not a new restriction per se. Calling from an outside thread (including external modeless dialogs) has never been supported in Revit unless the API calls are made from a handler of an Idling event (since 2012) or External Event (since 2013). Both approaches are well documented in SDK samples – Look for ModelessDialog in the Samples Folder. External Events are particularly useful in modeless dialogs. They allow a clean, safe, and easy workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you are correct about calling the API while the active view is Perspective. That has never been allowed, and, in fact, most Revit internal commands are disabled in that mode too. There is a task open for enabling the API in Perspective and we hope to make it happen as soon as we figure out a reasonably safe way. It is not as trivial as it may sound. I am sorry for that.&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>Mon, 22 Apr 2013 15:25:20 GMT</pubDate>
    <dc:creator>arnostlobel</dc:creator>
    <dc:date>2013-04-22T15:25:20Z</dc:date>
    <item>
      <title>Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877292#M79555</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a plugin which works fine with Revit 2012 and 2013.&amp;nbsp; On Revit 2014, the call to Transaction.Start throws an exception "Starting a transaction from an external application running outside of API context is not allowed.".&amp;nbsp; Has something changed between Revit 2013 and 2014 that does not allows transactions from plugin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 05:26:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877292#M79555</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2013-04-22T05:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877556#M79556</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it's related to this comment in "What's new" section in 2014 API documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No transactions from outside threads&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Calling into the Revit API from outside threads and outside modeless dialogs has never been supported, but it was not strictly prohibited, meaning there would be no immediate exceptions when someone tries to modify model from outside of the supported API workflows. That has been changed. It is no longer possible to start a transaction unless the caller is inside a legitimate API call, such as an external command, event, updater, call-back, etc. An exception will be thrown if such attempt is made&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 11:41:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877556#M79556</guid>
      <dc:creator>ollikat</dc:creator>
      <dc:date>2013-04-22T11:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877619#M79557</link>
      <description>&lt;P&gt;Yes - that would appear to be the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given this new restriction, I do not understand how you could open a transaction whilst a 3d perspective window is open, because the idler event does not get sent when in these views, nor are external commands available.&amp;nbsp; So many plugins which use the 3d perspective view will simply not work anymore.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 12:49:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877619#M79557</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2013-04-22T12:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877841#M79558</link>
      <description>&lt;P&gt;It is not a new restriction per se. Calling from an outside thread (including external modeless dialogs) has never been supported in Revit unless the API calls are made from a handler of an Idling event (since 2012) or External Event (since 2013). Both approaches are well documented in SDK samples – Look for ModelessDialog in the Samples Folder. External Events are particularly useful in modeless dialogs. They allow a clean, safe, and easy workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you are correct about calling the API while the active view is Perspective. That has never been allowed, and, in fact, most Revit internal commands are disabled in that mode too. There is a task open for enabling the API in Perspective and we hope to make it happen as soon as we figure out a reasonably safe way. It is not as trivial as it may sound. I am sorry for that.&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>Mon, 22 Apr 2013 15:25:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3877841#M79558</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-04-22T15:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3878283#M79559</link>
      <description>&lt;P&gt;Thanks Arnošt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the detailed reply, and understand the situation.&amp;nbsp; In general I think users do not want to loose functionality when going to the next release of a product, so perhaps this restriction could have be bought in AFTER the API had been enabled in the Perspective view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 22:39:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3878283#M79559</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2013-04-22T22:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3882321#M79560</link>
      <description>&lt;P&gt;Hello Paul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While I understand your frustration over the limitation, we did not really have a choice. Like I said, the workflow was never supported nor recommended. It was a bit of an oversight on our side not to put in the restriction a few releases earlier, even though we have always documented and advocated the correct approach. Over the last few years we have found too many a document corrupted and Revit session abruptly terminated, and in most if not all of such cases our investigation lead us to external addins accessing the API when they were not supposed to do so. Such attempts are always risky and down plain dangerous when outside transactions are started. While we understand that our decision might frustrate a few developers, we honestly believe it was a decision for the better and that most end-users will benefit from it rather than suffer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your understanding&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, 23 Apr 2013 14:49:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3882321#M79560</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-04-23T14:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3934403#M79561</link>
      <description>&lt;P&gt;So how do we fix this problem?&amp;nbsp; I have the same issue&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 20:07:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3934403#M79561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-23T20:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Start transaction not working with Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3935983#M79562</link>
      <description>I am afraid you cannot. Since the Revit API cannot be used in a perspective views (it never been able to, and it is documented), and since the API cannot be invoked outside of the main thread in Revit (has always been this limited, and it is documented), the scenarios mentioned above are not technically supported. We have may be able to allow the API in perspective views in the future; unfortunately it is not as simple as turning On a flag somewhere, so I cannot give any time estimates.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;Arnošt Löbel&lt;BR /&gt;Autodesk Revit R&amp;amp;D</description>
      <pubDate>Fri, 24 May 2013 19:33:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/start-transaction-not-working-with-revit-2014/m-p/3935983#M79562</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2013-05-24T19:33:53Z</dc:date>
    </item>
  </channel>
</rss>

