Hide elements in view

Hey Dynamo experts. I need some help with a dynamo script I am working on. I am trying to create a script that will hide groups on a drafting view/sheet. My intention is to filter groups on a drafting view by the key word “Pm notes” within the group type name. I seem to have the filtering for the groups and the drafting views coordinated however I am getting an error within the archi-lab view.hide elements node. Can you guys help. One post mentioned something about feeding it a list of names so I tried feeding it elementId’s and that didn’t work. This latest iteration is intended to combine element Id with type name prior to filtering but no luck. I also just tried feeding it 1 element Id via the element select node and one view also. It always gives me this same error.

The original thread I followed for this is here:

Hi, Looks like you need to filter the original list of Group Elements by your "contains’ values. Then feed the filtered list Elements as this is what the node is expecting.

Thank you for helping me Ewan. I gave this a try and I am still running into an issue perhaps I am doing it wrong. I filtered the list by the string contains, which if I understand correctly is bool masking the elements to true or false values. That part seems to be working but I have a similar error. Bool object has no “Ishidden” attribute.

Something similar to this :grinning:


Also, make sure you are feeding actual Views into the Hide node as well.
Easy to check, if it has a green ID then the item is a direct reference to a Revit element.

Awesome thank you! I will try this approach. I suspected the direct reference was apart of what I needed prior to you telling me that. I was trying to add it back into my list thats what all the “+” values are about early on. This answers alot of questions for me and simplifies things.

Ewan helped me sort this via PM. I just want to report back for future searches. A few things happened. Initially I I was attempting to feed the node a list of names. Then I tried to combine the element ID in. With a little back in forth I found I needed to have it plug in actual elements (Green element ID) as well as set up a boolean filter to remove/add whats necessary. As it turns out I also had an issue with my clockwork versioning. In addition to that I was attempting to hide by group type instead of the group instance within the views. Once that all was sorted my script runs as intended.

1 Like