Hide all instances of a specific dimension style



I found the following thread but I was hoping a new thread may keeps things clear.

I was able to hide all instances of a specific dimension style throughout the views in the my project.

After I have run the Hide Elements node, I have not been able to get all of the elements to unhide via the Unhide Node. One of the three test elements does unhide but not the other two.

I’ve tried closing Dynamo and re-running the Unhide Node but nothing seems to work. I have to manually go into the views in Revit and unhide the dimension instances.

Any advice is appreciated!

Thank you,
Thom K.


As i can see here there are only 3 elements.


Yes, this was just a small test. There are only three elements. All three hide consistently. Only 1 will unhide and the other two remain hidden. That is also consistent.

Thanks again,


Try this python code.

import clr
from Autodesk.Revit.DB import *
from System.Collections.Generic import *

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()
elementlist = list()
for item in elements:
ielements = List[ElementId](ids)

#Unhide Elements
OUT = (view,elements)


Thank you very much for the code!

I’m getting the following warning:

I’m assuming I should connect the list of elements to IN[0] and all the views in the document to IN[1].

Is the OUT to be connected to something else?

Thanks again,
Thom K.


I am not near my pc. Can you show me values of Document.Views?


It appears to be listing all of the views in the model.

Would it be more efficient to extract just the views that the specific elements are in and feed that into the hide/unhide?

This seems to be doing more of a brute-force attack.

Thanks again,
Thom K.


Could you share with us your rvt file?




Get the workset of the dims and use that to filter the views you hide and unhindered them in.

(Edit: I can spell)


Thanks for the response, I can see the Workset parameter for the dimensions with Element,Parameters, but I can’t seem to extract it out to filter it to the View.UnhideElements node.

Thanks again,
Thom K.


Can you post a screenshot of your DYN?


Sorry for the delay in getting back to you:


Ah. I was referring to the script which you were using to get the workset. If I can fit it in I’ll try and find some time to review this later.


Got ya: The Document.Views is just pulling all of the views and that’s passing into the View.UnhideElements node.

I can’t figure out why the View.HideElements works consistently and completely but the View.UnhideElements will only unhide the one element.

In any case, I certainly appreciate any effort you can help me with!

Thanks again,
Thom K.