Using Line length in custom variables

Dear Seamly2D-users, I have a problem using Line lengths in variables. Everything goes fine as long as I am defining the custom variable. I can see the Line lengths and use them in my formula. But as soon as I click ‘refresh’, or at the moment I use the custom variable in construction of a new point, all lengths turn to zero. Any idea what I’m doing wrong? I saw a topic about the same issue a few years ago, but did not find a solution yet.

1 Like

Hi @yvonnei, welcome to the Seamly forum!

I’m having trouble finding where it was discussed before, but as I recall, measurements are read first from the measurements file, then from the variables table, then from the draft. So, even though you, in your pseudo-omniscience, can see the measurement that the variable calls, it doesn’t actually exist yet at the time you call it, & thus returns nothing.

You can get around this by including in the variable’s equation everything that goes into setting that line length. Which is sometimes impractical.

Otherwise we risk an infinite recursion loop, which would be a problem. The devs have discussed the feasibility of implementing a recursion-check instead of the solid anti-recursion wall, & decided that it would probably be reasonable, but I don’t think they’ve had a chance to explore it yet.

If I misunderstood something, I welcome correction!


1 Like

Thank you, your answer is clear and very helpful!