Insert Legend in sheet


Hi Daniel,

Thanks for sharing the script. I tried to insert the panel schedule into the sheet using the script but it looks like dynamo does not consider view schedules and panel schedules as the same. Could you please give me some tips about inserting the panel schedules to sheets?

Thank you very much


It’s interesting - I actually did get it to work after trying another legend on a another sheet. It will fail if the legend is already on the sheet like you say, however it will continue to fail even if I delete the legend from the sheet and try again. It’s like it works one time and then it won’t work again even if the legend is deleted.

Regardless - this is great! Thank you for helping me out with it.


Thanks for the feedback @skycostello,

I tested deleting and adding while I was creating this and worked fine, I will look into it further and see if I can replicate the issue. If I can I’ll update and post back here.



Hi @lyliyiwei,

I’ll have a look at this also, I don’t work with panel schedules so will see if I can fold this in and I’ll post an updated solution.



Hi Dan:

Thanks for your reply! I looked into the Revit API Doc, there are some classes related to panel schedule under the Autodesk.Revit.DB.Electrical Namespace. However, I am not familiar with python or C#…just hope the information is helpful.

Thanks for your help again!



Hi all,

From the comments by @skycostello and @lyliyiwei i have added some further functionality. The updates are as follows…


  • Panel Schedules are now supported and can be placed by point.
  • Refresh port added to allow user to force a re-execution of the node, This should resolve the error of supported view types not placing on sheet if they were deleted or the previos transaction was rolled back (undo command)


This is the updated script…
LegendPlacer.dyn (20.4 KB)

I have come to realise this is no longer a “legend” placer as it handles most things. :laughing:

Let me know if this works fine though, I have no issues in testing but I can’t test every situation.


Duplicate legend and rename duplicated legend with sheet number
Packing Lots of Views onto Lots of Sheets

You are awesome. Thanks very much


Brilliant! thanks for sharing Daniel :+1:


Hi Daniel,
thanks for sharing the script. I’m a bit a beginner in using Dynamo. I have one question: I’m not able to filter the sheets where I want to place a particular legend. I’ve tried with a parameter( for instance “Sub_Discipline”)and GetParameterValueByName and then by filtering it with a List.FilterByBoolMask; it filters the sheet, but the error "object has no attribute ID"comes when I try to link it with the python node. Any suggestions?
Thanks very much


Hi @gijodaigas,

You are not passing a sheet element into the node, you are passing just text from what I can see. You need to plug your sheets from the “all elements of category” node into the “list” port of the filter by bool node as you are currently just getting the parameter value and passing this as a as a sheet which won’t work. Also, flatten the list of views before plugging it in also.

Let me know if that works?



It works, thanks again. The only problem now is that, if I use it for the second time, (for instance for placing another legend in other sheets), it place the new one on the correct sheets, but it adds this new one to the previous sheets too. So In the first sheet, I have 2 overlined legends.


Really Great, Many thanks


to continue this great tread, i also im stuck with the same challenge as the poster above.
I am looking to place 1 schedule per sheet as shown in this capture. but the code right now places all view into all sheets, its probably something simple that im yet to graspt.


Hi @Wuillian_Medrano,

To be clear, are you trying to place legend 1 on sheet 1, legend 2 on sheet 2, legend 3 on sheet 3 etc.



Yes, that is my goal at this point. Best Scenario would be to match any number of views to a desired sheet and repeat. Anyone else interested, this post is also related with graphs.


@Daniel_Woodcock1 I am having an issue trying to run this workflow with just one sheet. Can you advise me on what I am doing wrong?


Hi @patrick_podeyn,

Are you using the version I posted?

Also, what package is Sheets in? I don’t have this node apparently.



Hi @Daniel_Woodcock1, it is a node in @john_pierson’s package called rhythm.


Hi @patrick_podeyn,

Ha, I’m really slack with the package updates. I tested with @john_pierson’s sheet node and it’s working fine for me…

What error message are you getting in the yellow balloon? You may be using one of the older versions of the node as it only has 3 ports and the new one has a refresh port.



I got it fixed, @john_pierson actually assisted me, the input I was feeding “IN[0]” was not correct and we got that sorted. Is it possible that you can make this a custom node and publish it on the package manager? This workflow is really awesome and very beneficial!