I have a layout with a single track main line. In one end of the line, there is a small station with a parallel track. In the other end, there is just a loop (I prefer the German word: Schleife) that makes the trains return to the station. I have set up contacts and LUA code to make the trains detach the passenger waggons at the station, pass by them in the parallel track, and attach them again in the other end. After that they leave the station - now driving with the opposite heading of the one they arrived to the station with. So, when the train arrives to the station, it drives alternatively forwards and backwards.
When detaching the waggons, I create a new consist, of course, and in automatic mode, the new consist gets a new name. When driving forwards, the engine gets the new name. When driving backwards, the waggons get the new name. When the engine attaches the waggons at the other end, it seems that the engine's consist name takes precedence. So a train arriving forwards, has a new name when it leaves, whereas a train arriving backwards, has the same consist name when leaving. The latter is nice, the first is annoying.
Is there any way to change the consist name programmatically? An undocumented EEPSetRollingStockName() for example?