<?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: Defining the start view using Revit API in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505924#M7641</link>
    <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;It's not quite what i want to do. with your solution the start view will be activated provided the plugin is installed. I prefer&amp;nbsp;"&lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-622E667E-FB0B-47E1-8F66-E237A70771BD" target="_blank" rel="noopener"&gt;Specify the Starting View for a Model&lt;/A&gt;&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think it's possible ?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 14:30:22 GMT</pubDate>
    <dc:creator>_CraigF</dc:creator>
    <dc:date>2024-01-18T14:30:22Z</dc:date>
    <item>
      <title>[SOLVED] Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505441#M7639</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is it possible to &lt;STRONG&gt;define the start view&lt;/STRONG&gt; using the API ?&lt;BR /&gt;At the moment, I can only find a way to access the parameter and find out if a view is defined as the start view.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 18:38:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505441#M7639</guid>
      <dc:creator>_CraigF</dc:creator>
      <dc:date>2024-01-19T18:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505513#M7640</link>
      <description>&lt;P&gt;Yes, you can. You could probably subscribe to and use the&amp;nbsp;&lt;U&gt;ApplicationInitialized&lt;/U&gt; event and the &lt;U&gt;UIDocument.ActiveView&lt;/U&gt; property to achieve this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.revitapidocs.com/2024/f35ba9fc-0b6b-4284-60eb-91788761127c.htm" target="_blank"&gt;https://www.revitapidocs.com/2024/f35ba9fc-0b6b-4284-60eb-91788761127c.htm&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.revitapidocs.com/2024/b6adb74b-39af-9213-c37b-f54db76b75a3.htm" target="_blank"&gt;https://www.revitapidocs.com/2024/b6adb74b-39af-9213-c37b-f54db76b75a3.htm&lt;/A&gt;&lt;BR /&gt;`&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 18 Jan 2024 11:23:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505513#M7640</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-01-18T11:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505924#M7641</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;It's not quite what i want to do. with your solution the start view will be activated provided the plugin is installed. I prefer&amp;nbsp;"&lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-622E667E-FB0B-47E1-8F66-E237A70771BD" target="_blank" rel="noopener"&gt;Specify the Starting View for a Model&lt;/A&gt;&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think it's possible ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 14:30:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505924#M7641</guid>
      <dc:creator>_CraigF</dc:creator>
      <dc:date>2024-01-18T14:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505940#M7642</link>
      <description>&lt;P&gt;If you want a solution that does not require programming, I am sorry to say that this is the wrong place to ask. Sorry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 14:39:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505940#M7642</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-01-18T14:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505996#M7643</link>
      <description>&lt;P&gt;Of course, I want to program.&lt;/P&gt;&lt;P&gt;I simply want to define the starting view once through programming, and then each time the file is opened, no plug-in is required (for example, if I send my mail to a customer).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 15:06:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12505996#M7643</guid>
      <dc:creator>_CraigF</dc:creator>
      <dc:date>2024-01-18T15:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506443#M7644</link>
      <description>&lt;P&gt;Aha. Well, as always, perform some research first to ensure that this functionality is present manually in the Revit end user interface. If not, the API will probably not be able to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 17:52:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506443#M7644</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-01-18T17:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506462#M7645</link>
      <description>&lt;P&gt;Sure this is possible manually, as explained here :&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-622E667E-FB0B-47E1-8F66-E237A70771BD" target="_blank" rel="noopener nofollow noreferrer"&gt;Specify the Starting View for a Model&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;A href="https://www.revitapidocs.com/2023/84788ba0-4edd-5483-eb22-898dbc21520b.htm" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GetStartingViewSettings&lt;/STRONG&gt;&lt;/A&gt; method lets you know if a view is already defined as the starting view. But I'd like to be able to define the starting view automatically via the API ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 18:02:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506462#M7645</guid>
      <dc:creator>_CraigF</dc:creator>
      <dc:date>2024-01-18T18:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506862#M7646</link>
      <description>&lt;P&gt;use this method to set your Starting View&lt;/P&gt;&lt;P&gt;void SetStartingView ()&lt;BR /&gt;{&lt;BR /&gt;// Code provided courtesy of:&lt;BR /&gt;// Studio A International, LLC&lt;BR /&gt;// &lt;A href="http://www.studio-a-int.com" target="_blank"&gt;http://www.studio-a-int.com&lt;/A&gt;&lt;BR /&gt;// The below code set the Starting View to a specific view that exists in Active Project&lt;BR /&gt;FilteredElementCollector feCollector = new FilteredElementCollector(activeDoc);&lt;BR /&gt;myView = feCollector.OfClass(typeof(Autodesk.Revit.DB.View)).Cast&amp;lt;Autodesk.Revit.DB.View&amp;gt;().Where&amp;lt;Autodesk.Revit.DB.View&amp;gt;(v =&amp;gt; ViewType.ThreeD == v.ViewType &amp;amp;&amp;amp; v.IsTemplate == false &amp;amp;&amp;amp; v.Name == "my3DStartingView").ToList().FirstOrDefault();&lt;BR /&gt;FilteredElementCollector svsCollector = new FilteredElementCollector(activeDoc);&lt;BR /&gt;Autodesk.Revit.DB.StartingViewSettings svs = svsCollector.OfClass(typeof(StartingViewSettings))&lt;BR /&gt;.Cast&amp;lt;Autodesk.Revit.DB.StartingViewSettings&amp;gt;().ToList().FirstOrDefault();&lt;BR /&gt;if (myView is object)&lt;BR /&gt;{&lt;BR /&gt;ElementId myViewId = new ElementId(Convert.ToInt32((myView.Id.ToString())));&lt;BR /&gt;if (svs.IsAcceptableStartingView(myViewId))&lt;BR /&gt;{&lt;BR /&gt;using (Transaction t = new Transaction(activeDoc, "Set Starting View"))&lt;BR /&gt;{&lt;BR /&gt;t.Start("Set Starting View");&lt;BR /&gt;svs.ViewId = myViewId;&lt;BR /&gt;t.Commit();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 21:04:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12506862#M7646</guid>
      <dc:creator>studio-a-int</dc:creator>
      <dc:date>2024-01-18T21:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12509113#M7648</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1136912"&gt;@studio-a-int&lt;/a&gt;&lt;/STRONG&gt;&amp;nbsp;It works perfectly ! Thanks a lot !&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":astonished_face:"&gt;😲&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 18:37:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12509113#M7648</guid>
      <dc:creator>_CraigF</dc:creator>
      <dc:date>2024-01-19T18:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the start view using Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12567972#M7649</link>
      <description>&lt;P&gt;Just out of principle, to continue my endless (and hopeless?) struggle against unnecessary calls to &lt;EM&gt;ToList&lt;/EM&gt;, may I point out that you can replace&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;.ToList().FirstOrDefault()&lt;/EM&gt; by a more efficient simple single call to&amp;nbsp;&lt;EM&gt;FirstElement&lt;/EM&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.revitapidocs.com/2024/c8c1cae0-4ac8-a309-e915-6d491137d47e.htm" target="_blank"&gt;https://www.revitapidocs.com/2024/c8c1cae0-4ac8-a309-e915-6d491137d47e.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If your model happens to contain 1000 views, the call to ToList will marshal all 1000 views objects and their entire data into a list before throwing out the 999 unneeded ones.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 20:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/solved-defining-the-start-view-using-revit-api/m-p/12567972#M7649</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-02-18T20:56:34Z</dc:date>
    </item>
  </channel>
</rss>

