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

Sorting User Objects

Started by Bob Bryce, April 28, 2018, 05:41:45 PM

Previous topic - Next topic

Bob Bryce

How is the display order dictated in the User Library.  They don't seem to be in any organised sequence. Is there a way to sort the order in which User Objects are displayed in the User Library, like by Name.

Tom Springer

It appears the ordering of the files (by name) is what AnyRail uses to show the "order" of objects in a user library.

If one wants to go through the effort, one can rename the UDRO files so that the names contain the object's name (the name is in the UDRO file), and then with the directory ordered by filename, the objects will appear in "order".  Or one can user a leading 3-digit value (001, 002, 003, etc.) in the filename to set the order if the object name would not be sufficient to maintain an order.

I've done this with some of my private user object libraries.
Tom Springer

(Unintentional Pyromaniac)

Bob Bryce

I went to do that, or try to and this is one of the file names:  1cd02595-1cc2-4677-9934-d8b6577a51f4.udro.

All 12 of them have the same format, different numbers/letters at random.  Can't find anything common or sequential about any of the file names.  They are already sorted by name, and I don't know which filename goes with which detail.

Tom Springer

Bob,

Open the UDRO folder in Windows for the object library you want.  Then in AnyRail, access that user object library.  Select the first user object, right click on it, and click "details" and AR will show you the object's file name.  Now you can rename it in the open folder.  However, one caveat ... once renamed, AR will no longer show the object's file name using the "details" process ... some quirk somewhere, I suppose.

When you are done with the renaming, you have to restart AR to see the new ordering of the user object entries.

An alternate method: open the actual URDO file in an editor that handles non-graphic data (I use EmEditor for such files).  Then you can browse down the file contents and you'll find the data: name, description, etc.  Some of the files have this as simple text (8 bit characters), other ones have it as UTF-8 (16 bit - double-byte - characters) so some eyeball adjustment may be necessary to read the info.
Tom Springer

(Unintentional Pyromaniac)

Nick the Cabin Boy

I have a similar problem, especially when more than one user has created a version of the same object.

Obviously, the file naming process would be the easiest to fix, and to simplify.  I assume that there is some third-party software in there somewhere.  I haven't created any objects for a while, but it would seem possible to create a filename which is something like "Manufacturer+catno+initials-of-maker", so in my case, a Metcalfe Terrace House would be "MetcalfePN103NCAY".  Easy to understand, and eminently sortable.

Perhaps David could investigate such a change?  I would also like to see the data entry panel changed, as you don't need two descriptions of the object.

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

Tom Springer

Maybe the user objects viewer that David added awhile back would be a good foundation/basis for handling a user object library.  Imagine being able to open the library, select via some method to 'view' the items in the library and get a display like the viewer provides, then being able to sort that list and have the list then stored in the folder for that library. Next time the library is accessed, the view (order) is used.

Of course, a nice addition beyond simple sorting would be the ability to select an individual entry and re-position it in the list, so one wasn't limited to a particular sort order.
Tom Springer

(Unintentional Pyromaniac)

David

It's better not to change the file name, as the name is the GUID (Global unique identifier) for the item.
The whole system of downloading new items etc. is based on it. You mght destroy the repository.

As the GUID is generated at random, the objects are indeed displayed in random order as well.

I'll see if there's a way of sorting and perhaps hiding them to make it easier to handle the vast amount of objects.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

Tom Springer

David,

Thank you.  As always, your efforts are greatly appreciated.
Tom Springer

(Unintentional Pyromaniac)