Edit Legend Views and Legend components with Dynamo

Hello everyone, thanks in advance for your collaboration.

I would like to use Dynamo for Revit to automate part of the process of creating Fabrication Drawings for curtain wall panels. Initially, I tried to create Legend views and add Legend components in them. However, it seems that it’s not possible to create Legend views from Revit using Dynamo, as I read and researched. The same limitation applies to Legend components. But I found a workaround: I can duplicate an existing Legend view. So, I created a “template” view where I placed the Legend component for the system panels in the desired arrangement.

My Dynamo script allows me to select a panel, create a Legend view with its components by duplicating the “template” view, and then change the view name to include the selected panel’s name. The next step is to find the elements in the view (the Legend components for the front, back, top, left, and right sides). I need to extract the “Component Type” parameter to change the family for these components. I use the “Element.SetParameterByName” node to try to overwrite the parameter value with the selected family. However, it doesn’t seem to change the parameter value as expected.

Additionally, I’m trying to find a way to obtain the “View” parameter of the Legend components to choose their orientation (front, back, etc.), but I haven’t been successful in getting this parameter.

Could you please help me with ideas on how to achieve what I need? I can not be able to upload the RVT reference file or the dyn one; however, find a img of the script. Thank you.

I think this problem is solved by now, it appears to been a dynamo bug. However, i want to ask, is there a way to automate dimensions for the legend componets placed on a legend view?
As i read, is not possible from api or dynamo, but with AI automation it is. Anyone know a way to put automatically dimensions on legend components placed on a legend view?
Thanks in advance.

@SergioDinD , please find my tutorial - its about changing view direction of legend components: Legend Components in Revit- How to change view direction with Dynamo (youtube.com) Best Regards, Kamil

1 Like