Conditionals


 

I have several logixes related to the same turnout. I was wondering if there is a way to combine them easily into one new logix (other than retyping them).
Ulrich


 

On 4/28/2025 12:23 PM, Ulrich via groups.io wrote:
I have several logixes related to the same turnout. I was wondering if there is a way to combine them easily into one new logix (other than retyping them)
Logix conditionals, not LogixNG conditionals?

Logix Conditionals moved _easily_? Nope.

But if you are able to edit text files, and you study how things are done in the .XML file, and you are willing to try, then yes, it can be done.

In the last week, I have made dozens of moves of Logix conditionals, from one Logix to another. There are some other things that are easy in .XML. But there are _many_ other things which are just too difficult for me to do in .XML, so I do those things in JMRI using the GUI tools.

I regularly have JMRI running, and have the .XML file open in Notepad++. I can _either_ make changes in JMRI (and save the .XML, which Notepad "sees" and asks me if I want to load the changed file), _or_ make changes in Notepad++ and shut down JMRI and and save the new XML from Notepad++ and re-start JMRI. Then I can find out whether I have made the .XML changes correctly or not. (I currently have an 90%+ attempt rate. But it hasn't always been that good!)

I find that a key process is to keep multiple copies of the .XML file.
"Revision control" software is a good idea, too...


 

*I* don't have an answer (other than directly editing the XML file, which is
probably a bad idea unless you really, really know what you are doing). BUT, I
would like to see an enhancement to allow copy-and-pasting conditionals both
within the same logix and between two logixes. Yes, it is possible to copy a
logix to a new one and copy the conditionals over.

At Mon, 28 Apr 2025 09:23:51 -0700 "Ulrich via groups.io" <albreuf@...> wrote:


I have several logixes related to the same turnout. I was wondering if there is a way to combine them easily into one new logix (other than retyping them).

Ulrich






--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

On 4/28/2025 1:47 PM, Robert Heller via groups.io wrote:
BUT, I
would like to see an enhancement to allow copy-and-pasting conditionals both
within the same logix and between two logixes.
You will likely be waiting for a long time before you see improvements in "Logix". The developers have said a few times that the code for "Logix" is "unmaintainable". That is _specifically_ why they developed LogixNG, and why they (mostly) recommend it.


 

Robert,

LogixNG has an internal clipboard that supports cut/copy/paste. See

Dave Sand

----- Original message -----
From: "Robert Heller via groups.io" <heller@...>
To: [email protected]
Subject: Re: [jmriusers] Conditionals
Date: Monday, April 28, 2025 12:47 PM

*I* don't have an answer (other than directly editing the XML file, which is
probably a bad idea unless you really, really know what you are doing). BUT, I
would like to see an enhancement to allow copy-and-pasting conditionals both
within the same logix and between two logixes. Yes, it is possible to copy a
logix to a new one and copy the conditionals over.

At Mon, 28 Apr 2025 09:23:51 -0700 "Ulrich via groups.io" <albreuf@...> wrote:


I have several logixes related to the same turnout. I was wondering if there is a way to combine them easily into one new logix (other than retyping them).

Ulrich






--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

How "compatible" is LogixNG and Logix? That is, how hard is it to migrate
from Logix to LogixNG?

At Mon, 28 Apr 2025 13:16:10 -0500 "Dave Sand" <ds@...> wrote:


Robert,

LogixNG has an internal clipboard that supports cut/copy/paste. See

Dave Sand


----- Original message -----
From: "Robert Heller via groups.io" <hellere[email protected]>
To: [email protected]
Subject: Re: [jmriusers] Conditionals
Date: Monday, April 28, 2025 12:47 PM

*I* don't have an answer (other than directly editing the XML file, which is
probably a bad idea unless you really, really know what you are doing). BUT, I
would like to see an enhancement to allow copy-and-pasting conditionals both
within the same logix and between two logixes. Yes, it is possible to copy a
logix to a new one and copy the conditionals over.

At Mon, 28 Apr 2025 09:23:51 -0700 "Ulrich via groups.io" <albreuf@...> wrote:


I have several logixes related to the same turnout. I was wondering if there is a way to combine them easily into one new logix (other than retyping them).

Ulrich






--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services












--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services


 

Robert,

The Logix "Select" menu has an option to "Export to LogixNG". There are special LogixNG expressions and actions that emulate the Logix variables and actions.

Personally, I don't see any value in exporting a Logix to LogixNG. However, I will restructure the logic to make use of the LogixNG features, such as nested if-then-else, local and global variables, modules, CSV tables for data input, etc.

One major difference is that the conditionals in a Logix are processed in sequence. A LogixNG is a container for a group of ConditionalNGs. The ConditionalNGs are independent and will be executed when their trigger events occur.

For some other differences, see

Dave Sand

----- Original message -----
From: "Robert Heller via groups.io" <heller@...>
To: [email protected]
Subject: Re: [jmriusers] Conditionals
Date: Monday, April 28, 2025 1:46 PM

How "compatible" is LogixNG and Logix? That is, how hard is it to migrate
from Logix to LogixNG?

At Mon, 28 Apr 2025 13:16:10 -0500 "Dave Sand" <ds@...> wrote:


Robert,

LogixNG has an internal clipboard that supports cut/copy/paste. See

Dave Sand


----- Original message -----
From: "Robert Heller via groups.io" <heller�e[email protected]>
To: [email protected]
Subject: Re: [jmriusers] Conditionals
Date: Monday, April 28, 2025 12:47 PM

*I* don't have an answer (other than directly editing the XML file, which is
probably a bad idea unless you really, really know what you are doing). BUT, I
would like to see an enhancement to allow copy-and-pasting conditionals both
within the same logix and between two logixes. Yes, it is possible to copy a
logix to a new one and copy the conditionals over.

At Mon, 28 Apr 2025 09:23:51 -0700 "Ulrich via groups.io" <albreuf@...> wrote:


I have several logixes related to the same turnout.���� I was wondering if there is a way to combine them easily into one new logix (other than retyping them).

Ulrich






--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services












--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services