Use a Variable value in Expression?

User: "Carlos Fondevila"
Altair Community Member
Updated by Carlos Fondevila

Hi all,

I'm trying to use a Variable value in a Expression, for example, I've created the variable "Speed":

image

And I want to use it as a variable in the body Motion Expression:

image

 

But it doesn't works.

Do you know haw can I use variables values to use in Expressions?

 

Thanks!

 

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "GTT Adam"
    Altair Employee
    Accepted Answer
    Updated by GTT Adam

    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

    User: "Praful"
    Altair Employee
    Updated by Praful

    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