Use a Variable value in Expression?
Hi all,
I'm trying to use a Variable value in a Expression, for example, I've created the variable "Speed":
And I want to use it as a variable in the body Motion Expression:
But it doesn't works.
Do you know haw can I use variables values to use in Expressions?
Thanks!
Best Answer
-
Hi Carlos,
For variables in the Expression Builder, you usually have to wrap them in curly brackets: { }
Solver Variables can also be referenced using the VARVAL call: {sv_position.VARVAL}
Hope this helps!
Adam Reid
1
Answers
-
Hi Carlos,
For variables in the Expression Builder, you usually have to wrap them in curly brackets: { }
Solver Variables can also be referenced using the VARVAL call: {sv_position.VARVAL}
Hope this helps!
Adam Reid
1 -
Adam Reid_21142 said:
Hi Carlos,
For variables in the Expression Builder, you usually have to wrap them in curly brackets: { }
Solver Variables can also be referenced using the VARVAL call: {sv_position.VARVAL}
Hope this helps!
Adam Reid
In addition to the curly braces around the variable, the entire expression has to be provided within backtics ` ` (its a key that looks similar to apostrophe, available at the top left near Esc)
So your expression should look like
`STEP(TIME,0,0,5,{sv_position.value.lin})`
Praful
2