<?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: close open views in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/10394465#M80022</link>
    <description>&lt;P&gt;UIDocument.GetOpenUIViews Method Gets a list of&lt;STRONG&gt; all open view windows in the Revit user interface&lt;/STRONG&gt;, not only the ones in UIDocument so it may return views from other documents and it may happen that some of them have the same id as the one you want to close so you may end closing mopre than one view&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jun 2021 10:42:22 GMT</pubDate>
    <dc:creator>Andekan</dc:creator>
    <dc:date>2021-06-16T10:42:22Z</dc:date>
    <item>
      <title>close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3743092#M80017</link>
      <description>&lt;P&gt;How can I use the API to close open views except the active view?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't see how to close a view....&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2012 12:33:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3743092#M80017</guid>
      <dc:creator>russ.green</dc:creator>
      <dc:date>2012-12-27T12:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3743102#M80018</link>
      <description>&lt;P&gt;or at least just check if a view is open and not active....&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2012 13:00:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3743102#M80018</guid>
      <dc:creator>russ.green</dc:creator>
      <dc:date>2012-12-27T13:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3744553#M80019</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not tried or checked in any way the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could check what happens if you delete the view from the project with Document.Delete() method, because view also derives from Element.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2013 08:16:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3744553#M80019</guid>
      <dc:creator>ollikat</dc:creator>
      <dc:date>2013-01-02T08:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3744556#M80020</link>
      <description>&lt;P&gt;you can;t delete an open view.&amp;nbsp; never mind!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2013 08:40:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/3744556#M80020</guid>
      <dc:creator>russ.green</dc:creator>
      <dc:date>2013-01-02T08:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/8071373#M80021</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var pCurrView = pDoc.ActiveView;
pUIDoc.RequestViewChange(pCurrView);                        
var lViews = pUIDoc.GetOpenUIViews();                        
foreach (var pView in lViews)                        
{
    if (pView.ViewId != pCurrView.Id)
        pView.Close();
}&lt;/PRE&gt;&lt;P&gt;Where pDoc is your Document and pUIDoc is you UIDocument.&amp;nbsp; Keep in mind, you can access your Document via the UIDocument&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:50:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/8071373#M80021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-15T15:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: close open views</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/10394465#M80022</link>
      <description>&lt;P&gt;UIDocument.GetOpenUIViews Method Gets a list of&lt;STRONG&gt; all open view windows in the Revit user interface&lt;/STRONG&gt;, not only the ones in UIDocument so it may return views from other documents and it may happen that some of them have the same id as the one you want to close so you may end closing mopre than one view&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 10:42:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/close-open-views/m-p/10394465#M80022</guid>
      <dc:creator>Andekan</dc:creator>
      <dc:date>2021-06-16T10:42:22Z</dc:date>
    </item>
  </channel>
</rss>

