John,
Most of the LE references are direct, such as turnouts and sensors.
The block references are indirect using the internal "layout block" table. The LE ¡°block" name maps to the "layout block¡± table userName which maps to the ¡°block¡± table userName. The layout block object uses a count field of LE references. When the count is zero, the layout block is not saved in the panel xml file.
On my TODO list is investigating the potential errors caused by the indirect structure. The main one that occurs in renaming a block in the block table can have unpredictable results. I no longer create blocks using the block table. I create them as needed using the Edit context menu. This automatically creates the layout block and the block table entry. If I need to rename a block, I create a new one using the Edit approach and later delete the old one.
The method that you used is designed to create layout blocks during panel loading. Dave Roberts has 9 panels which resulted in 7 errors per block since only two of the panels referred to each name.
Dave Sand
toggle quoted message
Show quoted text
On Dec 31, 2018, at 12:13 PM, john Wragg <teamwragg@...> wrote:
Hi Dave
Odd. Is there nothing on the JMRI console?
Did the changes Dave Sands made make a difference?
Dave Sands
Thanks for looking at the script. I learned something new about panels and their relationship to the tables
John