So i’m trying to make a script which turns on the key plan in sheets that contain ‘level’ in their names, therefore turning off the key plan for sheets that don’t.
What I have successfully managed to do is take all the sheets, sort them into a list of sheets that contain the word ‘level’ in their names.
What I can’t work out how to do is actually then get Revit to actually do the placing or taking away of the key plan.
Is your keyplan an actual floorplan, a legend, a family…?
If your parameter “Vis On Off Key Plan” is a boolean sheet (shared) parameter you can simply use the node “Element.SetParameterValue” to turn it on (linking it to the “in” output of your “List.FilterByBoolMask” node.
Instead if the parameter is on your titleblock (and not on the sheet) you must find the titleblock from the sheet, and then set the parameter to the titleblock itself:
Maybe this node can help you if you want to place a view (I guess you already know however that you cannot place a floorplan on two different sheets, otherwise Revit will give you an error )
Instead if you want to place a family (a titleblock, annotation, etc) this node might help (though I have never tried it on a sheet):
In your last example you are filtering the sheetnames, not the real sheets, and then you are trying to set the parameter to the sheetnames. You should connect the elements (coming out from “All elements of category” to the “list” input in the “List.FilterByBoolMask” node.
Let me know!
Yes! Sorry I did not pay enough attention to the picture, I thought you already did what I told you in the first picture of my first post:
Search for the “Sheet.Titleblock” node and place it after the list create and before the setparam!
If you can not find it in your dynamo you have to go to Packages(on the top bar)/Search for Packages/ and download Rhythm
Okay so i’ve got to the bit where it’s got all the title blocks and it’s trying to turn on all the key plans, but it can’t find the parameter despite it being there in the revit model. The other question I have is from your initial layout that still doesn’t separate out the sheets with the word ‘level’ contained in the sheet name?