Matching Views to Sheets for Placement

I’m reworking my template sheet organization and am trying to automate the placement of views on sheets. I have a graph that places them well enough, but if the views & sheets don’t correspond in ID numbers things get wonky, and I’m not sure how to fix the issue.

Example:
Sheets:
A101- Overall Dim Plan
A102- Overall Ref Plan
A103- Partial Dim Plan Area 1
A104- Partial Dim Plan Area 2
Views:
Overall Dim Plan
Overall Ref Plan
Partial Dim Plan Area 2
Partial Dim Plan Area 1

When sorting by element ID, the Area 1 & 2 views end up on the wrong sheets. Short of filtering only Area 1 views & sheets by level and going group by group, is there a smarter way to go about this?
The Graph:


The Sheet Browser:

Cheers! :beers:

Can you sort by the sheet name and sort by view name (each list separately).

use List.SortByKey (List is elements and key is the name).

Steven

That did the trick. Thanks! :beers: