# Duplicate legend and rename duplicated legend with sheet number

**URL:** <https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970>\
**Category:** Revit\
**Created:** [January 19, 2017, 2:24am UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970 "2017-01-19T02:24:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 19, 2017, 2:24am UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/1 "2017-01-19T02:24:14Z")

</div>

I have been lurking on the forum trying to gather information in preparation for my leap into creating my first dynamo script. I would like to start by being able to duplicate a generic legend based on the number of sheets created in Revit. For example I have a project that will utilize a standard generic legend that needs to get copied to each sheet. However as the project develops the legend will need to be altered specific to that sheet. So I would like to start by just figuring out how to duplicate a generic legend based on a sheet list. So if I have sheet A101, A102, and A103, then I would duplicate the generic legend to be Legend-A101, Legend-A102, and Legend-A103. I am not sure what nodes to start out with. Any guidance to point me into a direction or packages that I can download into dynamo to help with this is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 19, 2017, 8:52am UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/2 "2017-01-19T08:52:45Z")

</div>

Welcome to the forum! This could help to get started:

> [@Insert Legend in sheet](https://forum.dynamobim.com/t/insert-legend-in-sheet/4018/26):
>
> 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… [Lege…](https://forum.dynamobim.com/uploads/short-url/41IB1dgVf9c0dWJLI7FARJ1VXve.dyn)

---

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 19, 2017, 11:06am UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/3 "2017-01-19T11:06:20Z")

</div>

Thank you for your reply. I have already came across this and download it to try and familiarize myself with it. However i can not figure out the duplication of the legends. This script appears to put a specified list of schedules/ legends on multiple sheets that are created in the project. Very useful and I hope to incorporate that functionality to what I need in the future. I just want to take it one step at a time and create a script that will duplicate a legend based off a sheet list. Then as I figure that out then build on that and add additional functionality. Again thank you for the reply and information, greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Daniel\_Woodcock1](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Daniel\_Woodcock1](https://forum.dynamobim.com/u/Daniel_Woodcock1)\
**Post date:** [January 19, 2017, 12:29pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/4 "2017-01-19T12:29:41Z")

</div>

Hi @dmillerSNYXQ,

As far as I’m aware you can create or modify legends via the API - therefore you can’t do this in Dynamo either.

You can most like duplicate the view and rename via the same way you would any other view - search the forum for duplicating views.

But without being able to modify legends your workflow may not be viable.

Cheers,  
Dan

---

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 19, 2017, 1:24pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/5 "2017-01-19T13:24:46Z")

</div>

So if I am understanding correctly I should be able to duplicate a legend view, and the process should be similar process as duplicating a floor plan view in dynamo. Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Daniel\_Woodcock1](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Daniel\_Woodcock1](https://forum.dynamobim.com/u/Daniel_Woodcock1)\
**Post date:** [January 19, 2017, 1:35pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/6 "2017-01-19T13:35:40Z")

</div>

Hi @dmillerSNYXQ,

Yes, you can Duplicate a legend, but you can’t modify the Elements within the View. I really wish you could, however a workaround is to use Drafting Views. these you can modify as you wish, I needed to dynamically create a hatching legend which was view specific so created the legend in dynamo and baked into a Drafting View. It’s a bit fiddly but it worked nicely.

Cheers,  
Dan

---

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 19, 2017, 1:43pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/7 "2017-01-19T13:43:50Z")

</div>

Ok thanks. I can work with just duplicating the legend views for now. Still would be a time saver for this project and gives me an opportunity to learn. As my skill develops I can look into other workflows as described. Still trying to figure out even how to duplicate a view. Going go look on this forum and other sites to see if I can at a minimal duplicate the legends.

---

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 20, 2017, 12:41pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/8 "2017-01-20T12:41:08Z")

</div>

OK I have managed to get a working file that duplicates the legend views; however I would like to be able to add a prefix to the final legend names. I have struggled with getting this part. Any help appreciated. I did not screen capture my attempts at adding the prefix. I am just showing what is working and hope some one can guide me how to properly get a prefix added to the final legends name.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/a/8aaf73cb7932aa38a890ea3d1c25f6b1028a2ad3.png)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/f/8f1f482c32ae5e3224e1f1fc95abcfe04a631ccc.png)

---

<div class="post-metadata">

**Author:** ![dmillerSNYXQ](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmillerSNYXQ](https://forum.dynamobim.com/u/dmillerSNYXQ)\
**Post date:** [January 20, 2017, 1:00pm UTC](https://forum.dynamobim.com/t/duplicate-legend-and-rename-duplicated-legend-with-sheet-number/8970/9 "2017-01-20T13:00:12Z")

</div>

Success!! I got it. Thanks for all the help.
