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.
Any help would be greatly appreciated!
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):
The key plan is an annotation family within the titleblock.
All I need to do is do something to my list of sheets containing the word ‘level’ in their name, and turn the key plan parameter ‘on’.
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!
Okay so I tried connecting them like that but it’s not working…
This is what the parameter looks like
Yup, but I do not know why you are getting an error. What does the yellow notification on top of the last node say?
It says no parameter found by that name. Is it because the annotation family is part of the titleblock not the sheet?
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 i’m trying to download it and I think you can only get it in Dynamo 1.3
What version are you using?
If you click next to the name a window will appear with different versions, try downloading an older one!
Okay i’ll give that a go cheers!
Thank you so much GregX i’ve since downloaded 1.3 and it works!!!
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?
Can you post an image of your errors?
Yeah in my example I did not filter the sheets with the word “level” in it because you already knew how to do it