<?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: change phase of a view in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223179#M76042</link>
    <description>&lt;P&gt;Hi Jeremy&lt;/P&gt;&lt;P&gt;I've tried what you explain on the blog but I don't know why it doesn't work..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  View active = commandData.Application.ActiveUIDocument.ActiveGraphicalView;
foreach (Phase ii in phase)
{
Parameter p = active.get_Parameter(BuiltInParameter.VIEW_PHASE);
                            ElementId iiId = ii.Id;
                            p.SetValueString(iiId);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank for your help !&lt;/P&gt;</description>
    <pubDate>Wed, 20 Aug 2014 07:11:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-20T07:11:05Z</dc:date>
    <item>
      <title>change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5206419#M76040</link>
      <description>&lt;P&gt;Is it possible to change the phase of a view? Something like view.phase ? I've tried with the created pohase but it doesn't work..&lt;/P&gt;&lt;P&gt;Thank for your help !&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2014 10:10:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5206419#M76040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-11T10:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5208529#M76041</link>
      <description>&lt;P&gt;Does this old post help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2009/03/create-room-on-level-in-phase.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2009/03/create-room-on-level-in-phase.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please look specifically at the reply to most recent comment by Jared:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2009/03/create-room-on-level-in-phase.html#comment-6a00e553e16897883301a511f1f07a970c" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2009/03/create-room-on-level-in-phase.html#comment-6a00e553e16897883301a511f1f07a970c&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:52:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5208529#M76041</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-08-12T07:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223179#M76042</link>
      <description>&lt;P&gt;Hi Jeremy&lt;/P&gt;&lt;P&gt;I've tried what you explain on the blog but I don't know why it doesn't work..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  View active = commandData.Application.ActiveUIDocument.ActiveGraphicalView;
foreach (Phase ii in phase)
{
Parameter p = active.get_Parameter(BuiltInParameter.VIEW_PHASE);
                            ElementId iiId = ii.Id;
                            p.SetValueString(iiId);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank for your help !&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 07:11:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223179#M76042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-20T07:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223283#M76043</link>
      <description>&lt;P&gt;Dear Sabatierae,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is your variable 'phase' defined?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you checked what storage type the built-in parameter VIEW_PHASE is expecting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use RevitLookup to explore it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever storage type it it expecting, I am pretty sure that you cannot set it using SetValueString.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would expect the storage type to be ElementId, in which case you need to set it using the element id directly, e.g. like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;p.Set(iiId);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 09:12:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223283#M76043</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-08-20T09:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223301#M76044</link>
      <description>&lt;P&gt;Yeah it works !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;phase is defined : PhaseArray phase = doc.Phases;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ElementId iiId = ii.Id;
Parameter p = active.get_Parameter(BuiltInParameter.VIEW_PHASE);
p.Set(iiId);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;with :&lt;/P&gt;&lt;P&gt;ii a Phase&lt;/P&gt;&lt;P&gt;active a view&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 09:27:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223301#M76044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-20T09:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: change phase of a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223335#M76045</link>
      <description>&lt;P&gt;Dear Sabatierae,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the confirmation!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went ahead and promoted this to a proper blog post on its own to ensure it is easily found by others as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/08/setting-the-phase-of-a-view.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/08/setting-the-phase-of-a-view.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 09:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-phase-of-a-view/m-p/5223335#M76045</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-08-20T09:56:09Z</dc:date>
    </item>
  </channel>
</rss>

