Hiding sections in floorplan

Hello everyone,

I’m rather new to Dynamo and at the moment I am trying to create a script that wil hide all sections in a floorplan wich aren’t on the same sheet as the floorplan.

My idea was to use the: View.HideElements. node

For the ‘view’ input i need to select all floorplans which are on a sheet. This shouldn’t be to hard but im still struggling to get this done.

For the “element” input I somehow have to select all sections accept the ones which are on the same sheet as the floorplan. A diffrent aproach could be to hide al sections and later unhide the ones wich are on the sheet. The thing is i dont know how to tell Dynamo wat to do first.

this is wat I got so far:

Is my idea doable, or should I go at this a whole other way?

Thank you in advance!

Hi @l.rozendaal

Here is one of the possible way…

Thank you so much for the quick response! :+1:

At the moment I’m having some problems with my packages. After I fixed that I’ll give your idea a try!

@ Kulkul

I tried copying your first idea. but i dont have the: get all views node. I looked it up and i should be in the archi-lab.net packages. I have that package, but not the node…

It says I have archi-lab.net installed but it looks like I have Archi-lab_Grimshaw. Could this be the problem?

I tried selecting the floorplans a diffrent way and i think i succeeded. The problem is that i have all floorplans. I don’t want to hide sections on al floorplans but only on the floorplans which are placed on sheets. So i need to build in a filter there somehow.

I tried running the scipt anyway and hiding sections in al views but it gave an error, wat did i do wrong?

@l.rozendaal Try restarting Revit and Run again.

Restarting did make the script run, but im stil not so happy about the script.

Maybe I didnt explain correctly wat I wanted. Basicly, for floorplans which are on a sheet, I don’t wat to see sections except if the section is on the same sheet. Floorplans that are not on sheets should stay untouched

PS. the filter in the script is on name. I want to be able to filter on viewtype, this way the designer can name their drawings whatever they want.

@l.rozendaal Since your floor plans are at “0” index you can simply use “List.FirstItem” node with lacing longest.