# How to set the active view?

**URL:** <https://forum.dynamobim.com/t/how-to-set-the-active-view/31797>\
**Category:** Revit\
**Tags:** orchid\
**Created:** [February 7, 2019, 11:42am UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797 "2019-02-07T11:42:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotr.bocian](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@piotr.bocian](https://forum.dynamobim.com/u/piotr.bocian)\
**Post date:** [February 7, 2019, 11:42am UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/1 "2019-02-07T11:42:30Z")

</div>

Hi,  
I would like to use Dynamo to open Revit families in the background with Orchid, set the active view to named view and save. But I’m not able to find a node to set the view. Any thoughts?

---

<div class="post-metadata">

**Author:** ![Tomasz](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/tomasz/32/66785_2.png) [@Tomasz](https://forum.dynamobim.com/u/Tomasz)\
**Post date:** [February 7, 2019, 2:16pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/2 "2019-02-07T14:16:54Z")

</div>

Is there anything else you want to do with that opened family other than save the family file? There’s no need to activate a view in that case.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [February 7, 2019, 2:24pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/4 "2019-02-07T14:24:06Z")

</div>

Not possible using Dynamo since the only was to set the active view and do something with it is when Revit isn’t in its idling event. The catch being Dynamo can only execute during Revits idling event, and theirin lies the problem.

You can set the active view asynchronously, (so you can use Dynamo to do this) however, control has to return back to Revit for the change to take place, so you can’t do anything other than change the view to cut a long story short…plus you have to be in the active document to call this method. Search the forum if you’re interested - I posted the technique a while back in the forum.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [February 7, 2019, 2:39pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/6 "2019-02-07T14:39:08Z")

</div>

Yep, exactly what I said. RequestViewChange is the asynchronous method I mentioned …with all the limitations I mentioned. That said, maybe you can conjure up some magic, so I’ll leave this one with you.

---

<div class="post-metadata">

**Author:** ![piotr.bocian](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@piotr.bocian](https://forum.dynamobim.com/u/piotr.bocian)\
**Post date:** [February 8, 2019, 12:42pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/7 "2019-02-08T12:42:27Z")

</div>

Yes, I need to do more.

---

<div class="post-metadata">

**Author:** ![piotr.bocian](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@piotr.bocian](https://forum.dynamobim.com/u/piotr.bocian)\
**Post date:** [February 8, 2019, 12:43pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/8 "2019-02-08T12:43:37Z")

</div>

Thank you. But for me it’s unbelievable that simple thing isn’t possible.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [February 9, 2019, 7:56am UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/10 "2019-02-09T07:56:48Z")

</div>

Thanks for reiterating everything I said, ignoring it, coming full circle, and wasting your time in the process 👍

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [February 9, 2019, 8:10am UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/12 "2019-02-09T08:10:17Z")

</div>

Your time is valuable - use it wisely:

Here’s RequestViewChange() in action from a post 2 years old. You can’t call this method in the background as it’s a UI call…which can only be made when Revit is full fired up, not open on disk (which incidentally answers your other question).

> [@Changing active view is temporarily disabled?](https://forum.dynamobim.com/t/changing-active-view-is-tempoerarily-disabled/9267/6):
>
> @chrisishere I’ve recently created a tool in Dynamo which needs to set a particular view. I thought I’d share this code snippet as there is another method you can use which does successfully set views. Its worth mentioning that you can’t set the uidoc.ActiveView in Revit’s Idling event. That’s a major drawback for Dynamo, since Dynamo operates inside this event (i.e. its not possible). Instead you need to use RequestViewChange(). Its executes asynchronously, so if you need to set a view first, t…

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [February 9, 2019, 8:16am UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/14 "2019-02-09T08:16:56Z")

</div>

Please forgive me for sharing useful, sound advice. Have a great day 👍

---

<div class="post-metadata">

**Author:** ![thuanamd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thuanamd/32/93646_2.png) [@thuanamd](https://forum.dynamobim.com/u/thuanamd)\
**Post date:** [March 21, 2019, 2:02pm UTC](https://forum.dynamobim.com/t/how-to-set-the-active-view/31797/16 "2019-03-21T14:02:08Z")

</div>

Hi @erfajo, I have an idea for set active view for Revit . It is that you can Run dynamo to open Revit file , after that , you set the view to starting view and close Revit file . I think that when you open Revit again , starting view is active view .  
Anything else for my idea ?
