开云体育

LogixNG extracting multiple values from table #logixng


 

JMRI 5.10
Windows 11
?
I've been bending my pick trying to figure this out all afternoon.
I want to set a collection of turnouts to individual states. I have a table with two columns, turnout name and desired state. I can extract the turnout names to a local variable in a for-each statement and I can set each of those turnouts to some constant state like THROWN. But I can't figure how to extract the target state from that second column and apply it to the current turnout from the same row.?
?
Must be simple but I don't get it.
?
George


 

George,

Try something like this.
The current name of a turnout is in the turnout local variable. ?The row is selected from the table using the turnout name and then the specified state is selected from the State column for the selected row.

Dave Sand



----- Original message -----
From: "George Hofmann via groups.io" <george.hofmann=[email protected]>
Subject: [jmriusers] LogixNG extracting multiple values from table #logixng
Date: Saturday, March 22, 2025 5:49 PM

JMRI 5.10
Windows 11
?
I've been bending my pick trying to figure this out all afternoon.
I want to set a collection of turnouts to individual states. I have a table with two columns, turnout name and desired state. I can extract the turnout names to a local variable in a for-each statement and I can set each of those turnouts to some constant state like THROWN. But I can't figure how to extract the target state from that second column and apply it to the current turnout from the same row.?
?
Must be simple but I don't get it.
?
George


 

That worked. I had tried that technique before without success. But there were some issues in my data file now fixed.
?
It's all good.
?
Thanks
George