Page 1 of 1
Cannot delete this variable because it is used in macro Main by icon Loop
Posted: Mon Jul 13, 2026 12:57 pm
by andeug
Hi,
I have a little project I am working on, and I realized I cannot delete the variable marked in the picture below if I am choosing "Loop Forever":

- Screenshot 2026-07-13 134859.jpg (65.83 KiB) Viewed 45 times
I can rename it, but in my FC project, I cannot see it anywhere on a first view.
So I started to dig and found it on Properties: Loop, hidden on "Loop until", which was not selected.

- Screenshot 2026-07-13 135405.jpg (77.82 KiB) Viewed 45 times
Is this a bug that should be reported to Matrix TSL, or is this how FC is expected to work? Below is the project example.
Regards,
Andreas
Re: Cannot delete this variable because it is used in macro Main by icon Loop
Posted: Mon Jul 13, 2026 1:48 pm
by Steve-Matrix
Thanks for the report. As a convenience, Flowcode remembers any expression used in a Loop command. But this is hidden when "Loop Forever" is selected.
This should be fairly easy to fix - I will allow the variable to be deleted if it only shows in hidden/remembered expressions.
Re: Cannot delete this variable because it is used in macro Main by icon Loop
Posted: Mon Jul 13, 2026 2:07 pm
by medelec35
While waiting for a fix, the variable can be removed using your favorite text editor.
Before making any changes, always make a backup of the original first, as it's easy to make a mistake that will prevent your project from loading.
Re: Cannot delete this variable because it is used in macro Main by icon Loop
Posted: Mon Jul 13, 2026 2:27 pm
by andeug
I have actually fixed the issue within the same project, after digging a bit into Loop.
I have only seen this problem once, so it does not affect me (but might affect other newbies like me).

Re: Cannot delete this variable because it is used in macro Main by icon Loop
Posted: Mon Jul 13, 2026 2:40 pm
by medelec35
No problem.
For anyone else, if you do face the same issue and don't want to edit the fcfx file within an editor.
Just Right-click on the variable and select List occurrences.
Double click (or right-click and select Show) in the loop icon that appears within Icon Lists window.
You might need to change the loop type to Count, as that is only time you will find a variable.
You find the variable causing the issue (until and update hase fixed it of course).