hmclay Geschrieben 1. April 2023 Geschrieben 1. April 2023 Constructing a Control panel using the "Blocks" provided. When I change a Switch (Turnout) on one Block then a number of blocks must change to show the route (typical) I now assign a keyword to EACH corresponding block that I want to change. Would like to group them together and assign one keyword to the group and have all the blocks in that group change "Color" Possible? .... better approach? Sure is tedious to assign each little block a keyword! Thanks .....
Goetz Geschrieben 1. April 2023 Geschrieben 1. April 2023 When you assign a keyword to each switch, you can loop (iterate) over all elements containing this keyword and set these switches accordingly.
hmclay Geschrieben 2. April 2023 Autor Geschrieben 2. April 2023 Thanks for the reply ... If I understand this correctly ... I cannot just group the blocks and assign a keyword to the group , then trigger that group ... I must assign each item in that group a keyword. Kind of what I thought .... I have 512 blocks in my control panel, most of which will need a keyword (maybe more than one per block) that's a lot of mouse clicking. Be nice to be able to group 10 together .... assign one keyword to the block .... then switch all in that group to a value. Seems group is more of a scenic tool. Thanks again for responding!
Goetz Geschrieben 2. April 2023 Geschrieben 2. April 2023 vor 2 Stunden schrieb hmclay: I cannot just group the blocks and assign a keyword to the group , then trigger that group That is correct. But you can select multiple elements - say all which are contained in a group - press ctrl + c to copy your selection into the clipboard and then build a list from that selection. You can iterate over such list as you would iterate over all items with a specific keyword. Maybe that helps?
hmclay Geschrieben 2. April 2023 Autor Geschrieben 2. April 2023 Goetz .... That may be the approach I've been looking for ..... Thanks I will certainly try that. Learning as I go !!!!
simonjackson1964 Geschrieben 2. April 2023 Geschrieben 2. April 2023 I'm not sure if this would work, as I've not tried it but there might be a way to store the name of the keyword on the triggering point/turnout and then reference it in the iteration meaning you only need one event. To be honest a lot of building a working layout in MBS is about deciding whether you want to do a lot of fiddling about with variables and keywords, and have a simple and streamlined event module, or whether you want to save time and effort at the build stage and put that time and effort into a more complex and repetitive collection of events. There is no correct or wrong answer, and it's really just personal preference. Personally I go for streamlining the EV as it always seems wasteful to me to have a whole load of events that are doing the same job. But to have one event for each occurrence of the "event" might make sense in a given scenario...
hmclay Geschrieben 7. April 2023 Autor Geschrieben 7. April 2023 simonjackson196 ... seems we are on the same "track" .... I too like to have one callable event (subroutine) that's called to do a repetitive job. The user event allows for that technique with the passing of variables etc.. Takes some thought to implement, but worth it in the long run. The hard thing for me is getting use to the nomenclature used in the program. Sometimes an item is referenced as a switch then a signal .... a switch is a turnout or a physical switch and switch is listed in several selectable categories. Triggers ... when to select ... and all those "cog" icon selections are the equivalent of which witch is which. Has taken me some time to sort out. If it wasn't for the help of this forum, it would take longer or become impossible at times. Thanks to all who give help !
Empfohlene Beiträge
Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren
Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können
Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen.
Neues Benutzerkonto erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden