<?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: Remove Revisions on Sheets in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10049143#M28568</link>
    <description>&lt;P&gt;I thought I tried this method, and it made no changes (the revisions were set to 'Issued'). However, I must have done something wrong the first time, because when I reimplemented, it works great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2021 22:26:36 GMT</pubDate>
    <dc:creator>rhanzlick</dc:creator>
    <dc:date>2021-02-01T22:26:36Z</dc:date>
    <item>
      <title>Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10048661#M28566</link>
      <description>&lt;P&gt;I am writing an addin to edit revisions for many sheets simultaneously. I see in the API that revisions can be added to a particular sheet using the 'SetAdditionalRevisionIds' method. However, I don't see an obvious way to remove revisions currently on a sheet. (This is all assuming we are modifying revisions that were manually added and not controlled by any content on the sheet eg revision clouds.) Is there a way to remove revisions from a sheet in the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 19:13:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10048661#M28566</guid>
      <dc:creator>rhanzlick</dc:creator>
      <dc:date>2021-02-01T19:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10048918#M28567</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;&lt;A title="GetAdditionalRevisionIds " href="https://www.revitapidocs.com/2020/6d852f22-cf1b-3bcb-c255-184998d1334c.htm" target="_blank" rel="noopener"&gt;GetAdditionalRevisionIds &lt;/A&gt;&amp;nbsp;, these are the revisions not created by revisionclouds on the sheet or in any of the placed views.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the returned collection remove the id's of the revisions that need removing.&lt;/P&gt;&lt;P&gt;Then set&amp;nbsp;&lt;A title="SetAdditionalRevisionIds " href="https://www.revitapidocs.com/2020/376a4009-17f7-af8e-8c32-d95243ad8e9e.htm" target="_blank" rel="noopener"&gt;SetAdditionalRevisionIds &lt;/A&gt;&amp;nbsp;with the edited collection from above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps:&amp;nbsp;&lt;A title="GetAllRevisionIds" href="https://www.revitapidocs.com/2020/e6f4e79f-c076-8085-5288-6e0b5a431177.htm" target="_self"&gt;GetAllRevisionIds&lt;/A&gt;&amp;nbsp;will return ALL revisions, from Revision clouds and "Revision on sheet" checkboxes.&lt;/P&gt;&lt;P&gt;conclusion: GetAllRevisionIds - GetAdditionalRevisionIds = RevisionIds set by revisionclouds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note deleting (and adding) Revisionclouds only possible if the Issued state of the revision is off.&lt;/P&gt;&lt;P&gt;This is not needed for SetAdditionalRevisionId (like in UI).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Michel&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 21:00:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10048918#M28567</guid>
      <dc:creator>TripleM-Dev.net</dc:creator>
      <dc:date>2021-02-01T21:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10049143#M28568</link>
      <description>&lt;P&gt;I thought I tried this method, and it made no changes (the revisions were set to 'Issued'). However, I must have done something wrong the first time, because when I reimplemented, it works great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 22:26:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/10049143#M28568</guid>
      <dc:creator>rhanzlick</dc:creator>
      <dc:date>2021-02-01T22:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11449618#M28569</link>
      <description>&lt;P&gt;Dear fellow coders,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This week I had to solve a similar problem. Another way to approach this matter is by using the FilteredElementCollector. Assuming everything related to all the revisions on a sheet will be deleted, you can break it down in steps. First delete all revision cloud tags, secondly delete the revision clouds and finally the revisions. Below you can see an example. To complete the routine I also added a bit of code to avoid conflicts with revisions that are already issued. Hopefully this will help somebody for future use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim revs As New SortedList(Of String, Boolean)
Dim colRev As New FilteredElementCollector(doc)

For Each r As Revision In colRev.OfCategory(BuiltInCategory.OST_Revisions)
   revs.Add(r.UniqueId, r.Issued)

   r.Issued = False
Next

Dim colRevClTags As New FilteredElementCollector(doc, sheet.Id)
doc.Delete(colRevClTags.OfCategory(BuiltInCategory.OST_RevisionCloudTags).ToElementIds)

Dim colRevCl As New FilteredElementCollector(doc, sheet.Id)
doc.Delete(colRevCl.OfCategory(BuiltInCategory.OST_RevisionClouds).ToElementIds)

Dim colRevs As New FilteredElementCollector(doc, sheet.Id)
doc.Delete(colRevs.OfCategory(BuiltInCategory.OST_Revisions).ToElementIds)

For Each r In revs
   Dim rev As Revision = doc.GetElement(r.Key)

   rev.Issued = r.Value
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 08:57:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11449618#M28569</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2022-09-29T08:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11450362#M28570</link>
      <description>&lt;P&gt;Wow thanks for the solution, but yours goes above and beyond my initial question! I'll convert yours to C#, and try it out when I have some time available.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 15:19:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11450362#M28570</guid>
      <dc:creator>rhanzlick</dc:creator>
      <dc:date>2022-09-28T15:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11451704#M28571</link>
      <description>Little correction. I just edited the code fragment I posted yesterday. Recovering the issued state of a revision doesn't seem to work by using the element id. Using the stable unique id instead fixes the problem.&lt;BR /&gt;&lt;BR /&gt;Cheers!</description>
      <pubDate>Thu, 29 Sep 2022 09:02:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11451704#M28571</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2022-09-29T09:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Revisions on Sheets</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11451967#M28572</link>
      <description>&lt;P&gt;Dear Tim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for sharing this very clear and effective direct approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit surprised. I would have expected each successive call to &lt;U&gt;OfCategory&lt;/U&gt; to be added to all existing previous filters. Therefore, calling it twice with different categories ought to return zero elements, and thrice even more so. Every filtering call on a given collector narrows down the search criteria further. "You need to reinitialise a filtered element collector before reusing it. All the filters that you add to it are accumulated. If they are mutually exclusive, you will get zero results."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2019/11/design-automation-api-stacks-collectors-and-links.html#4" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2019/11/design-automation-api-stacks-collectors-and-links.html#4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I am surprised that you can reuse the one single collector in the way you show.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But hey, if it works, so much the better.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Congratulations and best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 11:37:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/remove-revisions-on-sheets/m-p/11451967#M28572</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-09-29T11:37:50Z</dc:date>
    </item>
  </channel>
</rss>

