Upcoming Events

No events to display

We are not planning any more in-person events until the COVID-19 situation has improved.

Assign Train Categorys in bulk

You are here: Home > Forum > Simulations > Timetables > Assign Train Categorys in bulk

Page 1 of 1

Assign Train Categorys in bulk 01/05/2021 at 18:55 #139249
madaboutrains
Avatar
266 posts
Just wondering if it is possible to assign train categorys in bulk when creating timetables?

If it is, can someone please guide as how you can do it in the editor?

Cheers

RIP Feltham Panel 1
Log in to reply
Assign Train Categorys in bulk 01/05/2021 at 19:14 #139250
Steamer
Avatar
3581 posts
It's not possible, unfortunately.

When creating the timetable, using the 'Duplicate' function will carry over the train category as well, but obviously this is only useful to you if you're still creating schedules.

"Don't stress/ relax/ let life roll off your backs./ Except for death and paying taxes/ everything in life.../ is only for now." (Avenue Q)
Log in to reply
Assign Train Categorys in bulk 01/05/2021 at 19:51 #139251
postal
Avatar
4687 posts
Online
Steamer in post 139250 said:
It's not possible, unfortunately.

When creating the timetable, using the 'Duplicate' function will carry over the train category as well, but obviously this is only useful to you if you're still creating schedules.
It may be possible if you unzip the completed TT file then edit the savedtimetable.xml file. Bill_gensheet tried something similar when adding UIDs to an older TT and I have done similar by piggy-backing onto his work. The basic principle is to open the xml in an editor like Notepad++, copy and paste the data over into a spreadsheet and then use formulae to insert the train type code where the parameters of length, speed etc match. Copy the updated information back into the xml editor (like Notepad++), resave the xml within the existing unzipped wtt folder and zip it up again. There are probably easier ways but that worked for Bill and I was glad to leech off his work. Only worth trying if you are reasonably proficient with things like spreadsheets or are prepared for a bit of a learning curve.

“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Log in to reply
Assign Train Categorys in bulk 01/05/2021 at 20:51 #139252
madaboutrains
Avatar
266 posts
postal in post 139251 said:
Steamer in post 139250 said:
It's not possible, unfortunately.

When creating the timetable, using the 'Duplicate' function will carry over the train category as well, but obviously this is only useful to you if you're still creating schedules.
It may be possible if you unzip the completed TT file then edit the savedtimetable.xml file. Bill_gensheet tried something similar when adding UIDs to an older TT and I have done similar by piggy-backing onto his work. The basic principle is to open the xml in an editor like Notepad++, copy and paste the data over into a spreadsheet and then use formulae to insert the train type code where the parameters of length, speed etc match. Copy the updated information back into the xml editor (like Notepad++), resave the xml within the existing unzipped wtt folder and zip it up again. There are probably easier ways but that worked for Bill and I was glad to leech off his work. Only worth trying if you are reasonably proficient with things like spreadsheets or are prepared for a bit of a learning curve.
I have opened the xml and added the code for the category but the timetable analyser seems to not like it. Maybe a future feature to aid timetable making maybe

RIP Feltham Panel 1
Log in to reply
Assign Train Categorys in bulk 01/05/2021 at 21:41 #139255
bill_gensheet
Avatar
748 posts
madaboutrains in post 139252 said:
[quote=postal;post=139251]
I have opened the xml and added the code for the category but the timetable analyser seems to not like it. Maybe a future feature to aid timetable making maybe :)
I forget which way round, but you need to be very careful when recreating the zip.
I think it is:
rename wtt to zip
remove xml file
edit xml file
put xml file **BACK INTO THE SAME ZIP** as a 'replace' (not a new zip)
then rename zip to wtt.

If not, it is likely to be an xml structure inconsistency.
Does it validate as an xml file ?

Otherwise, given this is out and out bodgery, you won't get any helpful clues.

Can you give a more precise description of what you want to do ?

Bill

Last edited: 01/05/2021 at 23:04 by bill_gensheet
Reason: None given

Log in to reply
Assign Train Categorys in bulk 02/05/2021 at 00:21 #139256
madaboutrains
Avatar
266 posts
What I have done is quite simply paste in xml file.


Post has attachments. Log in to view them.
RIP Feltham Panel 1
Log in to reply
Assign Train Categorys in bulk 02/05/2021 at 15:13 #139259
bill_gensheet
Avatar
748 posts
Sorry, not enough information to assist you. What were you hoping it would do ?

Paste 1CD02AAC but instead of what ?

Is 1CD02AAC a category listed in the categories header ?
What are the 'category' data elements for 1CD02AAC category ?

Did the train have a category before - or is that what you are trying to fix ?
The xml data elements look like the 'default' train type of a 20m, 90mph diesel

What was the xml for this train in the original timetable (via editor) and original xml ?
Have you altered the other 'category' data elements (speed, length, electrification etc) ?
What was the analyser error ?

Bill

Log in to reply