Topics

Is there a way to group a set of layers related to a single theme and hide the rest of the layout and then work on those layers? #FeatureRequest


Mark Schneider
 

Hello again,  I have all of my layout drawings contained in the 100 layers of xtrackcad.   Is there a way to group  some of them into functional groups that I can make visible all at once and hide the rest of the layers.?   For instance, Electrical wiring is a couple of layers.    It is a pain to have to individually make visible these 5 layers and hide  many of my 1 to 20 layers .... and then go back.   thanks
Mark

 


Adam Richards
 

Mark.

No there isn’t - but there could be - sounds like a feature request.

I’d like to understand the use case - since it may be that you are using so many layers to get around another issue.

We have talked previously of grouping layers to ensure order of display. Layers are really groups today so we might benefit from groups that are real layers...

so understanding what you are doing might be illuminating

Adam


Mark Schneider
 

OK   (that is what I thought)   so   FEATURE REQUEST
So, I have two levels of the layout and so they are obviously two layers..... So  with respect to wiring, I have several layers corresponding to my documentation of what went where... so I have two layers for the DCC track feeds for each level and the bus runs,   I have a wiring diagram for the powered turnouts using Peco snaps and one diagram for the Tortise slow motion.   I have a layer for the Berret Hill smart toggles that control all of those and where I put the toggles for each turnout.  I have three reversing circuits on the layout... each is a wiring diagram.       Of course I could merge the layers but then I lose the clarity of just displaying whats important.  Right now.... I wound up  just segmenting the 80 layers into groups of 10 and go find the wiring layers when I need to sort something out.       Another example are my trial balloon option layers .    The what if... layers..... Eventually I pick one and build it... and move the layer into one of the 20 button layers.... but I don't want to  merge them and I don't want to delete them either.... I would like to  just group them, and then hide or display them  or lock them all   .   So basically  a level of organization for the 80 layers not accessed by the 20 buttons.       Since this is a feature request thread now...     It would fantastic to have a notes page with each layer..   I promise myself to write down all of the cheats and compromises made... but I don't because I don't know how to keep the notes tagged to the underlying track plan and context.     The Notes page now just gets too long and not really useful as a record of what changes etc you were making and why.   (mind you....   when you made your tunnells2.75 inches in clearance to solve a grade issue that you did not understand  using modern locs.... and then can't run your double stack container car.....   It all snaps back instantly BUT.... those are the big ... oh shoots)   Thanks for considering the idea


Mike M
 

Mark and Adam,

 

Here is scenario I have with 24 layers. I have separate layers for benchwork, code 70 track, code 83 track, structures, drawn scenic elements, turnout controls (tortoise or caboose ground throws), backdrops, wiring. Now double that for the second deck. Plus additional layers for hidden staging, the helix, room elements like doors and windows. It would be real handy if I could turn on and off all the layers associated with the lower deck or all for the upper deck with a single button. Just a thought.

 

Mike

 

From: main@xtrackcad.groups.io <main@xtrackcad.groups.io> On Behalf Of Adam Richards
Sent: Sunday, July 26, 2020 10:34 AM
To: main@xtrackcad.groups.io
Subject: Re: [xtrackcad] Is there a way to group a set of layers related to a single theme and hide the rest of the layout and then work on those layers?

 

Mark.

No there isn’t - but there could be - sounds like a feature request.

I’d like to understand the use case - since it may be that you are using so many layers to get around another issue.

We have talked previously of grouping layers to ensure order of display. Layers are really groups today so we might benefit from groups that are real layers...

so understanding what you are doing might be illuminating

Adam


Adam Richards
 

So I see two things - 

1. Ability to hide/show multiple layers as one.  Question - is there some relationship between Layers in different groups that are a cross-cutting stripe (all power-buses, for example) that is also important -> in other words is a Layer in one group or perhaps multiple?
2. Associate a Note(s) with a layer so that the Notes open/closed status is controlled by the Layer status.  Question - is one Note per layer enough for this purpose? 

Adam


Dwyane Ward
 

Adam,

Here a video of freezing/thawing multiple layer in AutoCAD with one click, but to do this you must be able to select multiple layers at once.

https://www.loom.com/share/d9a4f46c3bd74e3a83e261ad52f45722


--
Dwyane Ward


Mark Schneider
 

Adam,   I would think that one Note page  would be enough.    The amount of work shown in a layer is far more limited then for the whole layout...   I just date the entries in the main Notes tab under file and scroll down the time line....   Shouldn't be that extensive for a set of revisions to a description about the layer in Notes. 

Re how layers relate to one another?    I would love Hide all of the layers from one to 20.....   open a set of layers  speced out in Wiring tab ... turn off the layers I don't need and then add back the underlying track layers  from 1 to 20 as needed...... make my changes.... annotate the notes page of the layers in play .... click on close the remaining wiring tabs and then click on a tab that opens/ unhides  my basic set of user selected layers from the  1 to 20 button collection....      At the end of the day....  the track layout is common to everything. along with table edge.   the remaining layers serve to add to the picture of the layout you need to see..   Over time.... I move  layers that are more or less complete from the button 1 to 20    to some  other layer and move the current project layer into the button area.     When i need total flexibility... I just start with the manage layers pull down and click on view layer as needed.        Of course... I would love to hide all of those again as a group.   rather then scrolling back through and making them invisible again.  Thanks for the questions.!


Adam Richards
 

So I have some rough stuff together on two things on a code branch.

1. Layers can hide their button on the toolbar. This preserves toolbar real-estate.
2. A Layer can have a comma delimited list of layer numbers that will show/hide when it does.  There is no checking of unique-ness and no recursion (so a layer that hides another layer does not look to see if that layer has such a list) -> this stops loops. 

The net effect is that you can have some layers act as toggle show/hide for a group of other layers that optionally do not show their show/hide buttons.

Nothing stops you from selecting and showing any layer individually even if it is in a list - it will resync the next time the group layer is shown/hidden. 

I have worked out how to save/restore in the layout - I still have to work this out for the Layer profile. 

I know there is much more to do in terms of naming Settings profiles that harden some key settings, linking layers to named Settings profiles - more to do in other words, more to do.

Adam


Adam Richards
 
Edited

I have some functions to hopefully address a useful subset of these "layer and setting related" requirements in a development branch now - note that the naming of stuff is likely to change. 

My design philosophy is that new users will not need to look into these capabilities as they really have value when dealing with more elaborate layouts and needs. And so I am hoping those power users who do need this are "up" for a little setup work on their own part to enable them to be delivered much more quickly.

Here's what is in the dev branch -



1. A layer can have its layer show/hide button on the main window hidden (not included in the button list - the number is "skipped", the layer can still be selected in the droplist, however). 
2. A layer can specify a list of other layers that will be hidden/shown when it is hidden/shown.  Note - the layers in the lists do not have to be unique.  They are single level (the other layers do not cascade show/hidden). 
-> The intent of these two items is to allow groups of layers that are associated with "master layer" buttons. The masters could be by layout level, or by gauge, or all sensors, for example.  In fact however the user chooses to use them.
3. A layer can specify a settings file (new format .xset) in the working directory that will be read whenever it becomes the current layer and override the settings within it. If the settings file name is blank, the current "default" settings will be re-loaded.
4. Saved settings files are able to be created (and loaded manually) in the Layout Options page.  They are a named copy of all the then current settings put into a settings file. 


Because the settings files are in text format, and the records are being documented in the wiki, they are human-readable and can be easily edited by power-users using a text editor. Only included settings are set. So a user could choose to remove all but the settings they care to change for the layer(s) in the named settings file and so only override the scale, or scale and colors, for example, as suits them.

We already have the ability to save/load the layers "setup" - and some power users already know they can copy, edit and replace these in the (single) settings file, so that they can easily define all the layer characteristics using text editing. 

-----------

While I appreciate the UI aspect of a combolist with all modifiable settings in that list would be preferable - but extending the UI for more than two objects per line in combolists to cover both Windows and GTK is a heavy lift and certainly not achievable anytime quickly.  So I hope the ability to edit the configs outside the program will somewhat compensate for this. 

I also know that having UI control over what is stored in the settings files would be smoother, but I am hoping that by allowing user control, in a "UI tweaks" manner, we get a faster functional delivery - and some bright person could always create a settings tool outside XTrackCAD to display, modify, archive, the settings. 

Anyway, that's what I have, questions, observations, brickbats, etc. 

Adam


Adam Richards
 

Anyone have any observations?  

Mark's request for groups that are hidden and shown together is part of the solution.  I have not included Notes - as Notes can be placed on a layer or links provided to external documentation. 

Mike's seems similar on layer management. 

I have not yet looked at freeze/not freeze via the group master, I admit, as Dwayne is showing AutoCAD doing.   The issue of a combolist with many objects is beyond what i can attempt just now. Show/Hide effectively freezes layers, of course as you can't select hidden tracks.

The ability to have presets, as Mark suggests, for layers is addressed via the settings files.  

Adam
 





Adam Richards
 

Bump. 

Any comments on the feature set and how applicable it is to the use-cases? 

Adam


Jack Haverty.
 

Hi Adam,

Nice job!  The "Layers" functionality looks good to me.  I have 2 suggestions about the "settings" functionality:

1/ I think there should be 3 possibilities for each particular setting: 1) change to a new value; 2) keep the current value; 3) load the "default" value (value on program startup).  Your description sounds like it only does new or default.

In other words, when you switch to a different layer, some settings would be set to a new value, but others might stay the same as they were in the previous layer -- i.e., not set back to default.   So when setting a preference for a given layer, you would either specify a new value, or "unchanged" or "default".

2/ I'd like to see anything that can be "set" to appear as a "setting" in the preferences screen for a layer.  There are other settings, like default radius of circle track, easement settings, parameter files loaded, default offset for parallel track, etc. etc. -- anything that can be changed on any of the menus.   Perhaps instead of a cluttered screen, the user could simply set everything as desired and then "save" that profile for use with that layer.  So whenever the layer is selected, all those settings would be applied (with the same 3 possibilities - new value, no change, reset to original startup default.   It may also motivate having "Merge" in addition to "Write" and "Read" for settings files.

Maybe this is already included in "more work to do".

/Jack


On 8/22/20 6:08 PM, Adam Richards wrote:
3. A layer can specify a settings file (new format .xset) in the working directory that will be read whenever it becomes the current layer and override the settings within it. If the settings file name is blank, the current "default" settings will be re-loaded.
4. Saved settings files are able to be created (and loaded manually) in the Layout Options page.  They are a named copy of all the then current settings put into a settings file. 


Because the settings files are in text format, and the records are being documented in the wiki, they are human-readable and can be easily edited by power-users using a text editor. Only included settings are set. So a user could choose to remove all but the settings they care to change for the layer(s) in the named settings file and so only override the scale, or scale and colors, for example, as suits them.

We already have the ability to save/load the layers "setup" - and some power users already know they can copy, edit and replace these in the (single) settings file, so that they can easily define all the layer characteristics using text editing. 


Adam Richards
 

Jack,
1. The ability to leave things alone is already inherent in the selection of a settings file - because any values not changed in it (with no entry for them) would be left alone. That's where a user can edit the settings file to only set the values they care to change for this layer.  Only those changed values (and any set while in the layer) would be reverted on exit to a different layer with no settings value.  Obviously if the value was not set on entry and was not altered it would be unchanged upon moving onto a layer with no settings!!   

If we had a "don't do anything" settings file (which we could by having a file with just a comment and no settings), we would persist all values as they are on entry regardless of which layer we came from.  That would seem to be complex to understand in practice, though, because the settings would be determined by where one had come from rather than where one was going. A different path to the same layer might well yield different results - which is something users typically find bothersome.  It is achievable within the scheme I have laid out, though.

I'll have to ensure that when we leave a layer with a settings value to another with a different (non-blank) value we don't store the current settings values but only store them when leaving a layer with no settings value. 

2. That is exactly the idea - you do get to save ALL the settings from the Layout screen to a named file using a new control in Options->Layout. You first set them as you want and then save them (all). You are then able to edit the resulting text file as you choose to eliminate any fields you don't wish to set for the layer you are setting up.  For example, in a OO9 settings file, you clearly want gauge and minimum radius, max gradient, parallel track offset, maybe some color choices, but you may want to leave everything else alone. So you delete the rest of the settings from the "OO9" settings file. Then when you go into an OO9 layer, only those settings are altered. Upon return, all are restored to the values at the time you entered OO9.  By examining the format, you can alternatively produce the named files by hand if you prefer.

If you also had an "Electrics" settings file with colors for lines and font and fontsize set and jumped from an OO9 layer to an Electrics layer those Electrics values would be set, the rest left, but everything would be restored when going back to a layer without a settings file value.

I get the attraction of another UI to manage all the settings that provides a way of setting or inhibiting all values - and a "UI Tweaks"-like tool could be conceived of, but not built anytime soon. So for now, using the normal UI, saving and then hand editing to remove anything not needed will get the job done, I think. 

Knowing the format of the settings file (it is very simple) would enable one to quickly create new settings files by cut-and-paste of the relevant values as an alternative to set, save, edit.  

Adam


Jack Haverty.
 

OK, let me see if I got this...

When you select a different layer, the code takes a "snapshot" of all the current settings, and changes only those that the settings file for the new layer specifies.  Everything else stays as is.

While in that layer, you may change some settings; some settings you change may have been specified in the settings file for the layer, others may not.

On selecting the next layer to work on,any settings that you changed will be restored to the values as saved in the snapshot (even if they were changed by the settings file on entry).   Settings you didn't change, but were set by the profile file for that layer, will remain as is when you get to the next layer.  Of course, that next layer may also change things again from specifications in its associated settings file.

Personally, I think an edittable settings file is fine.   I'd be happy with something that looks like a typical config file, e.g., one that uses # to "comment out" lines that you don't want to take effect.   A UI would be nice, but a file works fine too.

I'm still not sure exactly what things you're including in a "settings file".  IMHO, it would be nice to have a lot more than what appears in the "layout screen".   E.g., there are "settings" like which commands are "sticky", what the default single-click tool does, text sizes and fonts, etc., scattered throughout the menus.

/Jack

On 9/1/20 1:18 PM, Adam Richards wrote:
Jack,
1. The ability to leave things alone is already inherent in the selection of a settings file - because any values not changed in it (with no entry for them) would be left alone. That's where a user can edit the settings file to only set the values they care to change for this layer.  Only those changed values (and any set while in the layer) would be reverted on exit to a different layer with no settings value.  Obviously if the value was not set on entry and was not altered it would be unchanged upon moving onto a layer with no settings!!   

If we had a "don't do anything" settings file (which we could by having a file with just a comment and no settings), we would persist all values as they are on entry regardless of which layer we came from.  That would seem to be complex to understand in practice, though, because the settings would be determined by where one had come from rather than where one was going. A different path to the same layer might well yield different results - which is something users typically find bothersome.  It is achievable within the scheme I have laid out, though.

I'll have to ensure that when we leave a layer with a settings value to another with a different (non-blank) value we don't store the current settings values but only store them when leaving a layer with no settings value. 

2. That is exactly the idea - you do get to save ALL the settings from the Layout screen to a named file using a new control in Options->Layout. You first set them as you want and then save them (all). You are then able to edit the resulting text file as you choose to eliminate any fields you don't wish to set for the layer you are setting up.  For example, in a OO9 settings file, you clearly want gauge and minimum radius, max gradient, parallel track offset, maybe some color choices, but you may want to leave everything else alone. So you delete the rest of the settings from the "OO9" settings file. Then when you go into an OO9 layer, only those settings are altered. Upon return, all are restored to the values at the time you entered OO9.  By examining the format, you can alternatively produce the named files by hand if you prefer.

If you also had an "Electrics" settings file with colors for lines and font and fontsize set and jumped from an OO9 layer to an Electrics layer those Electrics values would be set, the rest left, but everything would be restored when going back to a layer without a settings file value.

I get the attraction of another UI to manage all the settings that provides a way of setting or inhibiting all values - and a "UI Tweaks"-like tool could be conceived of, but not built anytime soon. So for now, using the normal UI, saving and then hand editing to remove anything not needed will get the job done, I think. 

Knowing the format of the settings file (it is very simple) would enable one to quickly create new settings files by cut-and-paste of the relevant values as an alternative to set, save, edit.  

Adam