Place Legend on Multiple Sheets

Hello all! I am very new to Dynamo, but have made a few scripts from tutorials and am starting to understand the workflow a bit more. However, I am struggling on the logic with this one. I know that there are similar tutorials out there for how to place a legend on multiple sheets at once, but I wanted to try to make this version work because it will be more of a learning lesson, rather than starting over by copying other work. I have not found a tutorial that uses the same nodes that I have in order to pull sheets from the project - (that could be the reason for my error). The reason I did my “Get Sheets from Project” workflow this way is because I want to have both the Sheet Name and Sheet Number visible in the Data Shapes UI, not just the sheet number as most tutorials show. This is very important for me.

I would really appreciate it if somebody could take a look at my attached workspace and tell me why I am getting an error at the end. Also, the Node titles look weird because it is photoshopped (titles wouldn’t show because the screenshot was too far out).

Note: 1 The legends in the project are just text and detail lines/region fills - they are not actual schedules.
Note 2: You can see at the “Logic” portion of the workflow that Dynamo is recognizing that I have selected a legend and three sheets from the Data-Shapes Interface, but it will not place the legend
. So I assume that the problem is coming at the very end, or possibly way farther at the beginning during the "getting legend/sheet " process.

Hi @sillywilly1798

From the warning you can understand clearly in 2nd input view it’s expecting Revit.Elements.Views.View which means it should come as an element id with green highlighted number written by the side of the name as you can see it in the sheet input as well but in your current graph you have provided it with string.

Please correct that input and it’ll work perfectly.

Regards,
BM

Thank you for the response! I am starting to understand more, but could you clarify which category is the problem? Is it the sheets or the legends? I do not know exactly where to put this node that you and dynamo are recommending :confused:


Here you can see in this image i marked the 2nd input given to ViewportBySheetViewLocation should be a element Id as u can see in green marked sheet selection similarly should be there at legend selection as well righ now you are not giving it the legend but you are just giving a string or just a name of legend which is not acceptable. Please see the snip below it’ll clarify properly

Regards,
BM

Hello! I wanted to reach back out and tell you that with your help, I found the problem where I was giving the SheetView Location node a string and not an element ID, and now it will place the legend on the sheet! Thank you so much!

Once I finally got it to place the legend, I then encountered one more slight issue that I was hoping you may know how to solve.

When the Data-Shapes UI launches, it allows the user to select a legend, a viewport type, and a sheet. The legend and sheet selection works perfectly. However, the Viewport type does not.

There are three Viewport Types in the project - Viewport 1, No Viewport Label, and Viewport NTS.
Preferably, the legends that I am placing should arrive on the sheet as “No Viewport Label” because I would likely end up turning the label off anyways in most cases.

My exact problem is that no matter which of these viewport types is selected by the user in the Data-Shapes UI, the legend will always insert on the sheet with “Viewport 1.” Basically, although I am wanting to allow the user to pick which viewport type they want, it will always default to Viewport 1 no matter which one is picked. You can see that I set the Default Index to 1, meaning that the option that appears first, without touching anything on the UI, is “No View Label”. Regardless, it will use Viewport 1 anyways.

I have attached a zoomed in area of the Viewport Selection Workspace. If there is anything you see here that looks incorrect when matched up with the rest of the workspace posted above, it would be great if you could point it out. Thank you so much!

Hi @sillywilly1798 Could u please close this thread as the title goes with Place Legend on multiple sheets as that issue is resolved please mark it as solution and for the new issue of UI default selection please start another thread as if some user is searching for the same issue they’ll be directed to that.

Regards,
BM