<?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: Document.UpdateFiles() reset/loose currently selected SavedViewPoints in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776546#M581</link>
    <description>&lt;P&gt;You're right.&lt;/P&gt;&lt;P&gt;If you take a reference to&amp;nbsp;&lt;SPAN&gt;doc.SavedViewpoints.CurrentSavedViewpoint, this is IsDisposed after any operation that deselect current review.&lt;BR /&gt;What I do is before doing the said operation, if CurrentSavedViewpoint is not null I use&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;path = SavedViewpoints.CreateIndexPath(CurrentSavedViewpoint).&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Then after the operation I use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;CurrentSavedViewpoint =SavedViewpoints.ResolveIndexPath(path).&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;This correctly reselect the previously active savedviewpoints.&lt;BR /&gt;I does not however reexpand the tree of&amp;nbsp;savedviewpoints.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 02:43:27 GMT</pubDate>
    <dc:creator>alexisDVJML</dc:creator>
    <dc:date>2024-05-16T02:43:27Z</dc:date>
    <item>
      <title>Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12770083#M578</link>
      <description>&lt;P&gt;Just a warning for those that programmatically update some appended files,&amp;nbsp;UpdateFiles() deselect&amp;nbsp;currently selected SavedViewPoints.&lt;BR /&gt;&lt;BR /&gt;Also note the same append if manually doing a Refresh via the GUI.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 17:14:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12770083#M578</guid>
      <dc:creator>alexisDVJML</dc:creator>
      <dc:date>2024-05-13T17:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776246#M579</link>
      <description>&lt;P&gt;I think modifying the current view also resets the currently saved viewpoint - so watch out for that one too! I would just recommend having your own reference to the "LastCurrentSelectedSavedViewpoint" and set it on doc.SavedViewpoints.CurrentSavedViewpointChanged if it is not null. Then before using the&amp;nbsp;LastCurrentSelectedSavedViewpoint check first if it is null and then second if it has been disposed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 23:34:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776246#M579</guid>
      <dc:creator>mtrainottiGHXJH</dc:creator>
      <dc:date>2024-05-15T23:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776248#M580</link>
      <description>&lt;P&gt;I haven't tested this for manually modifying it but at least when applying changes to the view by copying a viewpoint from either the Current Viewpoint or Active View does I believe-&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 23:35:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776248#M580</guid>
      <dc:creator>mtrainottiGHXJH</dc:creator>
      <dc:date>2024-05-15T23:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776546#M581</link>
      <description>&lt;P&gt;You're right.&lt;/P&gt;&lt;P&gt;If you take a reference to&amp;nbsp;&lt;SPAN&gt;doc.SavedViewpoints.CurrentSavedViewpoint, this is IsDisposed after any operation that deselect current review.&lt;BR /&gt;What I do is before doing the said operation, if CurrentSavedViewpoint is not null I use&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;path = SavedViewpoints.CreateIndexPath(CurrentSavedViewpoint).&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Then after the operation I use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;CurrentSavedViewpoint =SavedViewpoints.ResolveIndexPath(path).&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;This correctly reselect the previously active savedviewpoints.&lt;BR /&gt;I does not however reexpand the tree of&amp;nbsp;savedviewpoints.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 02:43:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776546#M581</guid>
      <dc:creator>alexisDVJML</dc:creator>
      <dc:date>2024-05-16T02:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776641#M582</link>
      <description>&lt;P&gt;If the reference to your saved viewpoint is valid why not just set it directly?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;if (CurrentSavedViewpoint!=null &amp;amp;&amp;amp; CurrentSavedViewpoint.IsDisposed== false)
  {
       doc.SavedViewpoints.CurrentSavedViewpoint = CurrentSavedViewpoint
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 03:56:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12776641#M582</guid>
      <dc:creator>mtrainottiGHXJH</dc:creator>
      <dc:date>2024-05-16T03:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Document.UpdateFiles() reset/loose currently selected SavedViewPoints</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12782797#M583</link>
      <description>&lt;P&gt;Agreed.&lt;BR /&gt;Was just posting an extract of the code showing how to handle the case where it's not valid &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;In my actual code, this is encapsulated into a IDisposable struct, so I just group the operation into a&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using (var _ = new _SaveCurrentViewPoint())
{ ...}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and yes I know IDIsposable structs are pure devil&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2024 01:49:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/document-updatefiles-reset-loose-currently-selected/m-p/12782797#M583</guid>
      <dc:creator>alexisDVJML</dc:creator>
      <dc:date>2024-05-19T01:49:12Z</dc:date>
    </item>
  </channel>
</rss>

