Closed Tzenzikk closed 3 months ago
There is no screenshot attached so I'm not sure where you're having an issue. I just added a custom variable, set it to 40mm, and used it in a formula and it works fine.
If you know the varianle name you can just type it in a formula field, otherwise you can click the FX button to open the Formula editor... from there you can select Custom Variables and select a variabe from the list to add to the formula. When you click OK it updates the formula in the tool dialog.
Hello! I recorded a video of the problem. Video by link: https://disk.yandex.ru/i/iQSrDADDL1ZI0g I'm waiting for a comment!
Hello! I recorded a video of the problem.
Thank you for the video. Now I understand the issue. This is a known limitation of the Variables Tables, in that the variables are parsed in the pattern before any tools. If you reference a tool's line length for example... when you click Refresh, the pattern is reparsed and the custom variable referencing the line length is reset to 0 as the tool has not been created yet so there is no value. In other words Custom Variables are limited to using measurements, functions, or other custom variables as long as they appear in the table list before the one you're editing a formula for.
For example: This is OK
This is not:
Hope this makes sense. At some point I need to figure out how to disable the tool variables in the FX Editor when entering a Custom Variable formula.
Thanks for the reply. But I didn't understand, will this be improved in the next versions?
Hi @Tzenzikk.
We follow the rules of programming: A variable (var1) cannot use the value of a second variable (var2) before the second variable (var2) exists. All programmers must follow this rule.
To fix this problem, we would need to be Time Lords. :) Var1 can use Var2 in its formula if Var2 is above it in the list.
The fix is to re-arrange the order of your variables in the Variables Tables.
HTH!!!!
После создания переменной и присвоения ей формулы она всё считает, но как только нажимаешь обновить или пытаешься использовать эту переменную, то выскакивает ошибка. Скриншот приложил.