Letters Cause Issue With Sorting by Drawing Number

Letters Cause Issue With Sorting by Drawing Number

K-Sampson
Explorer Explorer
549 Views
6 Replies
Message 1 of 7

Letters Cause Issue With Sorting by Drawing Number

K-Sampson
Explorer
Explorer

Hi Revit community,

 

I am running into a problem with drawing number sorting. My basement plans are given a "B" in their drawing number and this is messing up the sorting order. I don't understand why "A3.1B1" is sorted first by ascending order before "A3.002"

 

If anybody has any ideas I would love to know. Thank you

 

 

revit sorting.JPG

0 Likes
Accepted solutions (2)
550 Views
6 Replies
Replies (6)
Message 2 of 7

L.Maas
Mentor
Mentor
Accepted solution

I think they have chosen for a certain way of sorting.

 

This might make it clear

LMaas_0-1653507261823.png

As I understand it Revit sees:

1

3

4

14

102

 

After the dot it picks up the numbers for sorting, in htis case notonly the first character after the dot.

There are many methods sorting, some more striaght forward and some more fuzzy.

I guess they have looked at cases and decided on this way of sorting.

 

It is one of the reasons I usually pad lower numbers to equal length (e.g A3.014A1, A3.001A1, A3.101A1).

This usually avoids certain issues with sorting.

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 3 of 7

K-Sampson
Explorer
Explorer
Thank you for the examples given. now it makes sense that Revit looks at the entire string of numbers after the period, not just one digit at a time.
0 Likes
Message 4 of 7

L.Maas
Mentor
Mentor

Not tested extensively. So there might be some other algorithms at work

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 5 of 7

ToanDN
Consultant
Consultant
Accepted solution

If you want to keep the sheet numbering that way then you need to introduce a custom Sort parameter.

Another way is using the Reorder Sheets tool in pyRevit. 

 

ToanDN_0-1653509120440.png

 

0 Likes
Message 6 of 7

K-Sampson
Explorer
Explorer
I have never heard of the PyRevit add-in. Is the ReOrder Sheets command something that will affect my sheet schedule sorting rules? Ideally I would like for my SHEET INDEX drawing sheet to have a schedule on it that is sorted with a custom rule because it is too late for me to rename my drawings.
0 Likes
Message 7 of 7

ToanDN
Consultant
Consultant

@K-Sampson wrote:
I have never heard of the PyRevit add-in. Is the ReOrder Sheets command something that will affect my sheet schedule sorting rules? Ideally I would like for my SHEET INDEX drawing sheet to have a schedule on it that is sorted with a custom rule because it is too late for me to rename my drawings.

pyRevit will add invisible Unicode characters to Sheet Numbers in order to sort them using Sheet Number.  If your sheet index schedule is sort by Sheet Number then it should not be affected.  With that said, using a custom Sort parameter is a safer approach IMHO.