Choose which sector is highlighted on a legend based on sheet number

Hey All,

We are looking for a way to highlight the correct part of the legend on a sheet based on the sheet number. Each sector we have on a model has a different letter assigned to it and each area on the legend has a letter corresponding to those sectors to show the section of the model that you are seeing on the sheet. There are checkboxes on the legends that are checked to highlight the section of the model you are looking at on the sheet on the legend. For example if you check the box for “area B” in the legend then Area B will have a hatch pattern on it on the legend.

The sheet number we have always has a letter at the end that represents the sector displayed on the sheet. This is the sector that would be highlighted in the legend. Is there a way to use Dynamo to check the specific sector checkbox to highlight the correct sector on the legend using that letter we put at the end of the sheet number? I’m sorry for the lengthy post but I wanted to make sure this made sense. I have not tried anything so far because I am new to Dynamo and I wasn’t even sure if manipulating the legend was possible in Dynamo. Any feedback would be greatly appreciated.

Merry Christmas!

I built a tool to do something exactly like what you are looking for. I called them Units instead of sectors. this function works best if your views are set up with scope boxes instead of just crop regions.

2 Likes

Why not make copies of the legend (with different sectors highlighted) and place the correct legend on the correct Sheet?

You can also make a Family (with Visibility parameters) of the legend and go from there?

I think it is a bit simpler approach than Nicks.

If you use / make a Family you can use Dynamo to tick the right box based of the Sheet.

the parts in purple groups are mostly just for creating the UI with Data-Shapes.

1 Like

Nick’s solution does seem extremely complicated and I’m not even sure if that does exactly what I am looking for. I am really just trying to have a checkbox get checked if it corresponds to one character in our sheet number. Do you have an example of what you are talking about? I don’t fully get what you mean.

Lets say you made a Family (of your Legend) and your Family got, in example, 5 Visibility Parameters
A, B, C, D and E. Each of these Parameters is attached to a Filled Region highlighting the corrosponding ‘sector’. Now you can place this Family on your Sheet and use Dynamo to pick the right Parameter (A, B, C, D or E) and tick the box. So if your Sheet contains a C then the C box of the Family is ticked. I can’t be more clear to be honest.

NB
In this :point_up_2: workflow i am not using the Legends in the Revit project at all.

A different workflow can be (as mentioned before); Make, in example, 5 Legends (in your Revit Project) called A, B, C, D and E. All the Legends are exactly the same, but different parts (sectors) are highlighted. You can use Dynamo to place the right Legend on your Sheet. So if your Sheet contains a D then legend D is placed on your Sheet.

PS
Of course you can pick whatever you want how to highlight the text. I choose a Filled Region, but you can also make the text bold instead. Whatever you like.

This workflow I shared above is similar to what @bvs1982 shared at the beginning of his response. Our Title blocks have our units(sectors) key plan built into it, that key plan then has filled regions on each of the units(sectors) which has its visibility controlled by a parameter: “Unit A” “Unit B” etc. This is the base line for how the title block should be set up.

If you are trying to control those title block visibility parameters by what is on the sheet or what the sheet number is title is what my script is built around. It first looks at the views on a sheet and sees if any of them have a scope box applied to them (we label our scope boxes the same way we label our title block visibility parameters “Unit A”, etc) so if you had two views placed on a sheet that apply to say units D and E the scipt will check those units on the title block parameters. it then looks at the sheet name to see if it contains the words “Overall”. if it does it checks all of the units. if there are any sheets remaining that havent been checked by one of these options so far it pulls the sheet number say AF1B1 (architectural floor plan unit B first floor) and then checks unit B on the title block. i hope this helps. if you have a sprawling project, like we sometimes do with units from A-Z or more this could help everyone on your team save a ton of time.

1 Like

Oh okay, I think I understand it a bit better now. Do you happen to have the Dynamo file for this? I can try to make it from the image but there are certain connectors that I am having a hard time parsing out. Thank you for all your help

I am happy to help you parse out certain pieces of the script but I think it will serve your end goal better to build it from scratch and integrate the parts of my script where needed

1 Like

That’s what I was planning on doing but sort of in the reverse. I was hoping to get your file and then prune it down to just what I needed. But I will just go ahead and do that via the picture. Thank you for the help!

We use Zones built into our Title Block and use visibility params as has been mentioned. It’s very simple and scalable for different size projects pretty easily. Look at collecting ALL Yes/No params in a specific parameter group to help narrow the list of available selections.

Agreed, to Sean’s point this is how the script I posted starts, it looks at each of the title blocks and checks to see if it has the yes/no parameters available for the units/zone/sectors. this filters out our sheets that are for presentation and not for CDs or for removing cover sheets and similar title blocks that don’t need to be checked.