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.

Cheers,
Dan

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.

Cheers,
Dan

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!

Yiwei

Hi all,

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

Updates:

  • 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)

Screenshots:


Script
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.

Cheers,
Dan

11 Likes

You are awesome. Thanks very much

1 Like

Brilliant! thanks for sharing Daniel :+1:

1 Like

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?

Cheers,
Dan

1 Like

@Daniel_Woodcock1
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

1 Like

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.

1 Like

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.

Cheers,
Dan

1 Like

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.

1 Like

@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.

Cheers,
Dan

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.

Cheers,
Dan

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!

1 Like