<?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: Focal Distance is not set using Naviswork API in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/focal-distance-is-not-set-using-naviswork-api/m-p/7224014#M4526</link>
    <description>&lt;P&gt;The viewpoint does not have a "View" assigned to it so the focal distance is not valid. &amp;nbsp;I've had this issue as well. &amp;nbsp;I had to save the current viewpoint, make this viewpoint current, get the info needed and then reset to the current viewpoint that I saved. &amp;nbsp;My issue was not with getting the focal distance but trying to zoom the viewpoint to a bounding box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 23:59:25 GMT</pubDate>
    <dc:creator>JosephAugustino</dc:creator>
    <dc:date>2017-07-12T23:59:25Z</dc:date>
    <item>
      <title>Focal Distance is not set using Naviswork API</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/focal-distance-is-not-set-using-naviswork-api/m-p/7199067#M4525</link>
      <description>&lt;PRE&gt;We are developing  the .net application using navisworks api.
In that I have got one error –  “Focal distance not set”

Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;

  foreach (SavedItem item in document.SavedViewpoints.Value)
            {

                        SavedViewpoint SVP = item as SavedViewpoint;
                        Viewpoint vp = new Viewpoint();
                        vp = SVP.Viewpoint;
                       double focaldistance = VP.FocalDistance;
           }

Can you tell me how I can solve this.
1.I can access properties of manual created viewpoints by this api but
when I create viewpoints automatically(Export from Clash)that it gives
null properties(AngularSpeed =
{System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---&amp;gt;
System.Runtime.InteropServices.COMException: &amp;lt;&amp;lt;NavisWorks Error - Element
not present&amp;gt;&amp;gt;) such as focal Distance,Angular speed .&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 03:42:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/focal-distance-is-not-set-using-naviswork-api/m-p/7199067#M4525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-03T03:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Focal Distance is not set using Naviswork API</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/focal-distance-is-not-set-using-naviswork-api/m-p/7224014#M4526</link>
      <description>&lt;P&gt;The viewpoint does not have a "View" assigned to it so the focal distance is not valid. &amp;nbsp;I've had this issue as well. &amp;nbsp;I had to save the current viewpoint, make this viewpoint current, get the info needed and then reset to the current viewpoint that I saved. &amp;nbsp;My issue was not with getting the focal distance but trying to zoom the viewpoint to a bounding box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 23:59:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/focal-distance-is-not-set-using-naviswork-api/m-p/7224014#M4526</guid>
      <dc:creator>JosephAugustino</dc:creator>
      <dc:date>2017-07-12T23:59:25Z</dc:date>
    </item>
  </channel>
</rss>

