<?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: Transaction inside an IUpdater in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244653#M37454</link>
    <description>&lt;P&gt;H8 everyone,&lt;/P&gt;&lt;P&gt;thanjs for your responses,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried to use the onchangeddocument method but it doesn't seem to be woorking because it is read only and can t be used to modify the project.&lt;/P&gt;&lt;P&gt;the transaction i am trying to use is not to perform a change in the document. it is just a temporary transaction to get the floor points, i wonder if there is a way to get the floor center without performing that temporary transaction, using the floor bounding box for example ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thans in&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jan 2020 10:44:28 GMT</pubDate>
    <dc:creator>ridaabderrahmane</dc:creator>
    <dc:date>2020-01-11T10:44:28Z</dc:date>
    <item>
      <title>Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244114#M37450</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my situation i am trying to change the floor above a room when it's boundaries change.&lt;/P&gt;&lt;P&gt;for that i implemented an IUpdater to track the changes of my rooms and look for the floor above it to change it, but to make that possible i used the method Room.IsInRoom(Point) where the Point belongs to the floor.&lt;/P&gt;&lt;P&gt;to get a point that belongs to the floor i had to do a transaction and roll it back to get the model lines of the floor However the plugin throws an exception because we cannot make a transaction inside an Updater.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do things in another way ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 21:17:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244114#M37450</guid>
      <dc:creator>ridaabderrahmane</dc:creator>
      <dc:date>2020-01-10T21:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244304#M37451</link>
      <description>&lt;P&gt;If you need to use the temporary transaction trick, you could subscribe to the DocumentChanged event instead of using the updater. You will need to use a FilteredElementCollector though to filter for the spaces, since DocumentChanged triggers for anything.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 23:08:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244304#M37451</guid>
      <dc:creator>cwaluga</dc:creator>
      <dc:date>2020-01-10T23:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244456#M37452</link>
      <description>&lt;P&gt;You don't need a Transaction in an Updated because it happens during the transaction of the element being updated, IE in a transaction. Just remove the transaction and it should be fine. But then again, you shouldn't even need a transaction if you're just getting a point and checking if it's in a room.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 02:43:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244456#M37452</guid>
      <dc:creator>Sean_Page</dc:creator>
      <dc:date>2020-01-11T02:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244528#M37453</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;IUpdater.Execute() method is still &lt;STRONG&gt;inside&lt;/STRONG&gt; a &lt;U&gt;started Transaction&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 06:07:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244528#M37453</guid>
      <dc:creator>jlpgy</dc:creator>
      <dc:date>2020-01-11T06:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244653#M37454</link>
      <description>&lt;P&gt;H8 everyone,&lt;/P&gt;&lt;P&gt;thanjs for your responses,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried to use the onchangeddocument method but it doesn't seem to be woorking because it is read only and can t be used to modify the project.&lt;/P&gt;&lt;P&gt;the transaction i am trying to use is not to perform a change in the document. it is just a temporary transaction to get the floor points, i wonder if there is a way to get the floor center without performing that temporary transaction, using the floor bounding box for example ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thans in&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 10:44:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9244653#M37454</guid>
      <dc:creator>ridaabderrahmane</dc:creator>
      <dc:date>2020-01-11T10:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9245323#M37455</link>
      <description>&lt;P&gt;As there is an active transaction, you can simply use a subtransaction instead of a transaction.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 03:06:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9245323#M37455</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2020-01-12T03:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9245542#M37456</link>
      <description>&lt;P&gt;Hi dear,&lt;/P&gt;&lt;P&gt;Thank you very much for your response, i tried to use a subtransaction instead, the updater fails to roll back the subtransaction elthough i checked the subtransaction status and there is no other opened subtransaction in my project.&lt;/P&gt;&lt;P&gt;Kind regards;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 11:52:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9245542#M37456</guid>
      <dc:creator>ridaabderrahmane</dc:creator>
      <dc:date>2020-01-12T11:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9246205#M37457</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7164218"&gt;@ridaabderrahmane&lt;/a&gt; :&lt;/P&gt;&lt;P&gt;I do think that your Title is misleading everyone.&lt;/P&gt;&lt;P&gt;Let's suppose that you aim is to&lt;STRONG&gt; fetch the geometry center of a &amp;lt;Floor&amp;gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;And your personal (unsuccessful solution) is :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Using a &amp;lt;IUpdater&amp;gt;&lt;/LI&gt;&lt;LI&gt;Start a &amp;lt;SubTransaction&amp;gt; druing auto updating procedure&lt;/LI&gt;&lt;LI&gt;Do something to fetch some temp model lines&lt;/LI&gt;&lt;LI&gt;Rollback &amp;lt;SubTransaction&amp;gt;&lt;/LI&gt;&lt;LI&gt;Do anything else which you REALLY want to do&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2008/11/editing-a-floor-profile.html" target="_blank" rel="noopener"&gt;editing-a-floor-profile.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this post in JT's blog to see if it can help.&lt;/P&gt;&lt;P&gt;And the API class &amp;lt;&lt;STRONG&gt;Floor&lt;/STRONG&gt;&amp;gt; methods might help:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="saveHistory"&gt;&lt;DIV class="section"&gt;&lt;TABLE cellpadding="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="https://forums.autodesk.com/f27752c0-4c9e-df9f-e3cd-34a1465cf11a.htm" target="_blank" rel="noopener"&gt;GetNormalAtVerticalProjectionPoint&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="saveHistory"&gt;&lt;DIV class="section"&gt;&lt;TABLE cellpadding="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="https://forums.autodesk.com/7c9e72b2-c058-44cb-e355-4bf819b4371d.htm" target="_blank" rel="noopener"&gt;GetVerticalProjectionPoint&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps you are willing to share some codes to show everyone &lt;STRONG&gt;how you were doing and what you were intended to do&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&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;If there is a way to easily fetch the feature points of a &amp;lt;Floor&amp;gt;, then I think the whole Transaction thing won't be necessay, will it?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 03:56:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9246205#M37457</guid>
      <dc:creator>jlpgy</dc:creator>
      <dc:date>2020-01-13T03:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction inside an IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9247315#M37458</link>
      <description>&lt;P&gt;Thanks Bro, the method&amp;nbsp;&lt;SPAN&gt;GetVerticalProjectionPoint did solve my problem so no need to create a subtransaction and roll it back to get a point from the floor thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The implementation looks like this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;BoundingBoxXYZ boundingBox = floor.get_BoundingBox(null);&lt;BR /&gt;XYZ modelOrigin = (boundingBox.Min + boundingBox.Max) / 2.0;&lt;/P&gt;&lt;P&gt;XYZ floorCenter = floor.GetVerticalProjectionPoint(modelOrigin, FloorFace.Bottom);&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 15:16:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transaction-inside-an-iupdater/m-p/9247315#M37458</guid>
      <dc:creator>ridaabderrahmane</dc:creator>
      <dc:date>2020-01-13T15:16:59Z</dc:date>
    </item>
  </channel>
</rss>

