# Temporary hide in Dynamo

**URL:** <https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729>\
**Category:** Packages\
**Created:** [March 31, 2017, 7:59am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729 "2017-03-31T07:59:47Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manel\_Fernandez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manel_fernandez/32/9123_2.png) [@Manel\_Fernandez](https://forum.dynamobim.com/u/Manel_Fernandez)\
**Post date:** [March 31, 2017, 7:59am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/1 "2017-03-31T07:59:47Z")

</div>

Hi there!

I’ve found a node about isolate elements in view (Archi-lab\_Grimshaw Package) and I’m wondering if there’s a node which alow me to temporary hide an element in view.

Thks

Manel

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [March 31, 2017, 1:10pm UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/2 "2017-03-31T13:10:55Z")

</div>

Yes. In that same package.

---

<div class="post-metadata">

**Author:** ![Manel\_Fernandez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manel_fernandez/32/9123_2.png) [@Manel\_Fernandez](https://forum.dynamobim.com/u/Manel_Fernandez)\
**Post date:** [April 3, 2017, 6:16am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/3 "2017-04-03T06:16:51Z")

</div>

Sorry, I don’t find it in archilab package.

I’ve modified Isolate in view node to get what I want.

Cheers

Manel

---

<div class="post-metadata">

**Author:** ![EddieSaez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/eddiesaez/32/154542_2.png) [@EddieSaez](https://forum.dynamobim.com/u/EddieSaez)\
**Post date:** [October 18, 2018, 3:29am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/4 "2018-10-18T03:29:38Z")

</div>

Manel\_Fernandez  
Any chance of you sharing that node with us?

---

<div class="post-metadata">

**Author:** ![Manel\_Fernandez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manel_fernandez/32/9123_2.png) [@Manel\_Fernandez](https://forum.dynamobim.com/u/Manel_Fernandez)\
**Post date:** [October 18, 2018, 9:13am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/5 "2018-10-18T09:13:02Z")

</div>

Hi there,

You could use this node form Clockwork package:

![imagen](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/8236524854da766fb896bfae7fc848293e14596e.png)

Cheers

---

<div class="post-metadata">

**Author:** ![EddieSaez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/eddiesaez/32/154542_2.png) [@EddieSaez](https://forum.dynamobim.com/u/EddieSaez)\
**Post date:** [October 18, 2018, 9:47am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/6 "2018-10-18T09:47:50Z")

</div>

Tried that, but I need to temporarily hide elements not isolate them.

Hence my asking

---

<div class="post-metadata">

**Author:** ![Manel\_Fernandez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manel_fernandez/32/9123_2.png) [@Manel\_Fernandez](https://forum.dynamobim.com/u/Manel_Fernandez)\
**Post date:** [October 18, 2018, 12:44pm UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/7 "2018-10-18T12:44:23Z")

</div>

Hi there,

You can use the same node, just edit the python node inside this node to:

import clr  
clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*  
from System.Collections.Generic import \*

clr.AddReference("RevitServices")  
import RevitServices  
from RevitServices.Persistence import DocumentManager  
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument  
elements = UnwrapElement(IN[0])  
view = UnwrapElement(IN[1])  
ids = list()  
booleans =   
for item in elements:  
ids.append(item.Id)  
ielements = ListElementId

TransactionManager.Instance.EnsureInTransaction(doc)  
try:  
view.HideElementsTemporary(ielements)  
booleans.append(True)  
except: booleans.append(False)  
TransactionManager.Instance.TransactionTaskDone()  
OUT = (view,elements,booleans)

The diference is:  
File22:  
Original:  
view.IsolateElementsTemporary(ielements)  
Modification:  
view.HideElementsTemporary(ielements)

Cheers

---

<div class="post-metadata">

**Author:** ![EddieSaez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/eddiesaez/32/154542_2.png) [@EddieSaez](https://forum.dynamobim.com/u/EddieSaez)\
**Post date:** [October 18, 2018, 12:55pm UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/8 "2018-10-18T12:55:12Z")

</div>

Cheers… appreciate you sharing.

---

<div class="post-metadata">

**Author:** ![shkattii](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@shkattii](https://forum.dynamobim.com/u/shkattii)\
**Post date:** [February 19, 2019, 1:39am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/9 "2019-02-19T01:39:15Z")

</div>

What’s the symbol after booleans = ?

I can’t seem to copy it, after pasting it is blank.

---

<div class="post-metadata">

**Author:** ![Manel\_Fernandez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manel_fernandez/32/9123_2.png) [@Manel\_Fernandez](https://forum.dynamobim.com/u/Manel_Fernandez)\
**Post date:** [February 19, 2019, 9:11am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/10 "2019-02-19T09:11:40Z")

</div>

You can edit View Temporarily Isolate Element from Clockwork pakage:  
 ![imagen](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8bc7262f6706d526248b6b952844dddc88f5563c.png)  
import clr  
clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*  
from System.Collections.Generic import \*

clr.AddReference(“RevitServices”)  
import RevitServices  
from RevitServices.Persistence import DocumentManager  
from RevitServices.Transactions import TransactionManager

def TempHideElements(view, items):  
if not items: return False  
elif not isinstance(items, list): items = [items]  
ielements = List[ElementId]([x.Id for x in UnwrapElement(items)])  
try:  
UnwrapElement(view).HideElementsTemporary(ielements)  
return True  
except: return False

doc = DocumentManager.Instance.CurrentDBDocument

TransactionManager.Instance.EnsureInTransaction(doc)  
if isinstance(IN[1], list):  
if isinstance(IN[0], list): OUT = [TempHideElements(x, y) for x, y in zip(IN[1], IN[0])]  
else: OUT = [TempHideElements(x, IN[0]) for x in IN[1]]  
else: OUT = TempHideElements(IN[1], IN[0])  
TransactionManager.Instance.TransactionTaskDone()

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [February 19, 2019, 9:32am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/11 "2019-02-19T09:32:01Z")

</div>

its `booleans = []` but shows up as because the person did not format it as code using the `</>` button.

---

<div class="post-metadata">

**Author:** ![shkattii](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@shkattii](https://forum.dynamobim.com/u/shkattii)\
**Post date:** [February 22, 2019, 12:50am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/12 "2019-02-22T00:50:27Z")

</div>

![Untitled6](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/e/8e27a641de40662b829db69857cd907bedb401d5.png)

Thank you for this, however I’ve arrived with an warning message. What could be the cause? Thanks

---

<div class="post-metadata">

**Author:** ![shkattii](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@shkattii](https://forum.dynamobim.com/u/shkattii)\
**Post date:** [February 22, 2019, 5:25am UTC](https://forum.dynamobim.com/t/temporary-hide-in-dynamo/10729/13 "2019-02-22T05:25:55Z")

</div>

I get the same warning, when its feed with inputs… what could be wrong?
