If statement within run every command
Hi,
I want to change the value of a variable after a certain number of timesteps. I tried to do this using the following lines in my script
run 10 pre no post no every 1 &
"variable vke equal step" &
"if ${vke} > 5 then 'variable xp0 equal 1' "
I get an error after the 6th timestep (when the if condition becomes true): ERROR: Unknown command: 'variable
So it seems the nested quotes are a problem. I have also tried changing the quotes to
"if '${vke} > 5' then 'variable xp0 equal 1' "
but in this case the if condition is just completely ignored.
Forums:
- Read more about If statement within run every command
- 4 comments
- Log in or register to post comments