Dynamo Getting sheet names from sheet numbers

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

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.

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.

2 Likes

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.

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.

1 Like

GENERIC_Batch Exporter_script.dyn (89.0 KB)

1 Like

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

1 Like