News:

Due to heavy spamming attempts on this forum, automatic registration has been disabled. We will approve registration requests as quickly as possible (unless you're a spammer of course :) )

Main Menu

Layers Numbering System

Started by The Track Planner, September 07, 2018, 10:08:12 AM

Previous topic - Next topic

The Track Planner

David,
Please review the attached file. When designing large multi level layouts, I can use as many as fifty or sixty layers. As you can see on the attachment, I use an outline numbering system for the layers. This works well until the numbering system goes over 9 and has to use numbers of 10, 10.1, 10.2, or higher. At that point, layers do not sort correctly.  Even using the word "Layer" ahead of the number doesn't sort correctly. Can this be corrected/changed so when I go from 9.x to 10, or 10.x, etc. the layers sort in the correct numerical order? Thanks

David

This happens because an 'alphanumeric' sort is used.
AnyRail has no idea that one part is a number, and the rest text.

You can prefix the lower numbers with a 0:
01, 02, 03, etc.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

Bob Bryce

#2
That method works great.  Works fine up to 99 layers.  A suggestion:  When you are starting out, number the layers in increments of 5 (1, 5, 10, 15, 20, etc) so you will have growing room without needing to re-number if you add a layer.

Also, by starting out with 001, you can have up to 999 layers to be able to sort.  Then you can leave 10 or even 20 numbers (1, 20, 40, 60, 80, etc.) between each layer to start with and have even more room to grow without re-numbering anything.  Kind of like programming lines in Basic.  Always leave enough room between lines to add more code.

Tom Springer

To add to this discussion, I posted this last December:

Quote from: Tom Springer on December 08, 2017, 06:10:47 PM
One of the image editing programs I use (Paint Dot Net aka PDN) handles layer pane ordering by allowing the user to use the mouse to move/re-position a layer entry within the layer pane - up or down as the user wants.  No need for name "conventions" to sort the layer pane into some order.  I really love that ability and use it constantly.  Would be nice if AR had that capability.

My hope is that this layer "ordering" could be done easily, because, imho, it would address issues that can occur with layer use, including repositioning layers easily to change views as needed. Naming layers via a users "naming convention" helps, and I do exactly that for my layout designs, but if one wants to reposition them during layout development, changing layer names can be a burden.

Tom Springer

(Unintentional Pyromaniac)

The Track Planner

David,
Thanks for the quick response. I assumed that (alphanumeric) was the issue. While having the ability to re-position layers does not present a major issue for my design work, having the ability to color code various layers would be helpful. When I end up with 50 to 60 layers, it would be convenient to be able to color code various layers and sub-layers, i.e. all staging level layers the same color, or all main level layers the same color, etc. If each layer section could be represented by a different color selection, that would be helpful. Similar to color coding various track sections. Thanks again.

Nick the Cabin Boy

Some of you may know that, apart from model railways, my main hobby is photography.  For editing, I use Lightroom, which come from the same stable as Photoshop.  Apart from anything else, it has a very good tagging/searching ability (I'm almost obsessive about being able to track down an image!).

The other day, I was going through some images of a football match, identifying the players.  I started by having their name, followed by their number in brackets.  However, with the limited column width, I couldn't see the number, and for opposing teams to mine, I needed that.  So, I swapped them around, putting the number first.  It was then that I noticed something I hadn't seen before.  I was expecting the sort to go 1, 10, 11, 12, 13....2, 20, 21.... etc.  But it didn't!  My list showed:
1 Rhys Stanley
2 Zach Tuohey
3 Brandan Parfitt
.
.
10 Daniel Menzel
11 Tim Kelly

Etcetera

So it appears that the sorting algorithm in Lightroom, if it sees the first character as a number, treats the whole entry as a number until it gets to the first space, after which it treats everything in ASCII order.

If layers could be sorted in the same way, that might solve some problems.  I personally don't number layers, but I do sort them by using naming prefixes, such as "Scenery - Village" and "Scenery - Industrial Area", etc.

Nick the Nomad
Sitting in Geelong with nothing better to do at the moment!
Elizabeth Grove, South Australia
Building Pottersbridge, a fictional town a little North of London, served by a fictional Heritage Railway, in N

Future-Digital

#6
To have the sorting of layers feature that Lightroom has, consider this.

It would make AnyRail bigger, more difficult to maintain, slower, and keep work away from adding actual new and needed features.
Sorting with a zero is quite common, and appears all across computer programs that I use.

It is a matter of priorities. I would rather have David get back to working on major 3D and DCC wiring features than make a Lightroom change.

Bill
"I find television very educating. Every time somebody turns on the set, I go into the other room and read a book." - Groucho Marx

David

Well, one thing I'm wondering about is what the sorting order is when some layer names have a number, and some do not.
Should the numbered ones come first or last?
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

Future-Digital

We are on computers. Look back at the source. DOS had a specified sort order and it works still, including with both numbers and characters.

Bill
"I find television very educating. Every time somebody turns on the set, I go into the other room and read a book." - Groucho Marx

Nick the Cabin Boy

I agree with Bill!

The default ASCII sort (in which numerical digits come first) has worked for how many years?  I'm not advocating change, really, it's just that I thought that it was worth mentioning as an option.  As it appears to be an "expensive" option, I'll manage number-based sorting as I have in the past, with leading zeroes!  (Except in Lightroom, of course)

Nick the Nomad
Elizabeth Grove, South Australia
Building Pottersbridge, a fictional town a little North of London, served by a fictional Heritage Railway, in N