# Dynamo Getting sheet names from sheet numbers

**URL:** <https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [May 10, 2024, 1:04pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875 "2024-05-10T13:04:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NRGJeremiah](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@NRGJeremiah](https://forum.dynamobim.com/u/NRGJeremiah)\
**Post date:** [May 10, 2024, 1:04pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/1 "2024-05-10T13:04:32Z")

</div>

Heres the problem I’m running into. I’m getting the required information I need for this to work, the only problem I have is the print order. The script is designed to print PDF’s without us having to go through all the settings and selecting our sheets. Heres the script

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1a0315830ef26337030ff0193db88c8c1c827797.jpeg)

With this method i receive a list of the sheets I want, the only problem is they aren’t in order. With this export PDF node (Genius Loci), it will only print the sheets by the sheet name, not the number. If anyone knows a work around or how I can get the sheet names in order (they aren’t alphabetical it should be numerical from the sheet numbers.

The only ways I can think to do this is by getting the sheet numbers in order then finding the sheet names based on that and see if it returns it in the order the numbers were given, or use a different export node. (I have tried 3 other ones and they all have their own problems, I have found this one to be the easiest / most convenient). Keep in mind I’m still new to dynamo this is my first script I have made on my own.

---

<div class="post-metadata">

**Author:** ![danbuckinghamCA67E](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danbuckinghamCA67E](https://forum.dynamobim.com/u/danbuckinghamCA67E)\
**Post date:** [May 10, 2024, 2:07pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/2 "2024-05-10T14:07:19Z")

</div>

You should be able to use the SortByKey node to sort the list as you want.

I tend to use the ExportToPDF node from Crumple which has always proved reliable for me.

---

<div class="post-metadata">

**Author:** ![NRGJeremiah](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@NRGJeremiah](https://forum.dynamobim.com/u/NRGJeremiah)\
**Post date:** [May 10, 2024, 2:16pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/3 "2024-05-10T14:16:49Z")

</div>

Does Crumple print your sheets in numerical order?

The SortByKey to my understanding won’t work because when I have the sheet names they aren’t associated with the sheet numbers and the sheet numbers is what I’m trying to sort by.

I just tried Crumple and its the same way, it prints off of sheet names and not numbers, When I did use sheet names it only printed 1 PDF.

---

<div class="post-metadata">

**Author:** ![danbuckinghamCA67E](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danbuckinghamCA67E](https://forum.dynamobim.com/u/danbuckinghamCA67E)\
**Post date:** [May 10, 2024, 3:10pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/4 "2024-05-10T15:10:31Z")

</div>

I might not be fully understanding your issue, but this is a batch exporter I made for my practice, utilising Crumple, Rhythm & Data Shapes. The user is presented with a dialogue box to select destination folder, desired sheets, and required output formats. I’ll send the script in a minute.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/72979b797db9398d973de7584c4f371f58abda67.png)

---

<div class="post-metadata">

**Author:** ![danbuckinghamCA67E](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danbuckinghamCA67E](https://forum.dynamobim.com/u/danbuckinghamCA67E)\
**Post date:** [May 10, 2024, 3:11pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/5 "2024-05-10T15:11:37Z")

</div>

[GENERIC\_Batch Exporter\_script.dyn](https://forum.dynamobim.com/uploads/short-url/prox1gaUtnSEA8oHSkwvyfBR4xB.dyn) (89.0 KB)

---

<div class="post-metadata">

**Author:** ![NRGJeremiah](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@NRGJeremiah](https://forum.dynamobim.com/u/NRGJeremiah)\
**Post date:** [May 10, 2024, 3:59pm UTC](https://forum.dynamobim.com/t/dynamo-getting-sheet-names-from-sheet-numbers/100875/6 "2024-05-10T15:59:33Z")

</div>

I implemented your way of sorting the sheets in the beginning and it works great, thanks
