PDA

View Full Version : Schedule Sort Order



sthedens
2009-10-05, 05:42 PM
How does Revit do ascending sorts? I would assume it would use the ASCII values of the characters. See attached thumbnail for what is happening. The first column has an alias of "Number" that is actually the Mark value of the door. The schedule is sorted by Mark ascending. No other field is used in sorting. Yet Revit is pulling out the stair doors (the ones with "S" as the second character of the Mark value) and sorting them separate from the remainder of the doors.
I would expect 1S1, 1S1A and 1S2 to be between 113 and 200.
According to the ASCII character listing I have, numeral characters always sort before alpha characters.
It's like Revit is looking at the list of doors and saying, "Hey, I bet those doors with the "S" in the tags are special. Let me group those together. I'm sure that's what the user wants."

Munkholm
2009-10-05, 06:09 PM
Don´t know how revit is coded to sort these thing, but it´s not by using ASCII

9 sorts before 100, if it where ASCII, 9 would sort after 100, and 009 would sort before 100...

Guess, it´s some kind of an atempt to help us, so we won´t have to name door number nine, 009...

Example of Revit sorting:

1
1S5
9
009
100
101
A

Example of ASCII sorting:
009
1
100
101
1S5
9
A

ppirtle
2009-10-08, 03:29 PM
It's "helping you out" by simply sorting them by numeric value. It figures out the value to use by using any numbers at the start of the mark *until* it runs into a non-numeric character. Since "4S2" starts with "4," it comes in the list before "100."

As a side note, Windows (or maybe it was DOS) used to sort filenames by ASCII value. When they changed to sorting numerically, we ran into these same kinds of frustrations.

patricks
2009-10-08, 04:10 PM
If you want each Stair door to sort with the group of doors containing the same leading number (each floor perhaps?) then the S will have to go at the end of the door number string.

Or you could add a parameter like "Function" and use it to group the 1S's in after the 100's and so on.