Why doesn't this Command Snippet return my parameters returned from Classic Ansys ?

When a user inserted the following Command Snippet, he expected to have the parameters my_temp1, my_temp2, my_temp3, etc returned. Instead, the parameter was named "my_tem%j%", and it was assigned a value of zero. Why?

next_n=ndnext(0)

*do,j,1,5,1
*get,my_temp%j%,node,next_n,temp
next_n=ndnext(next_n)
*enddo


Workbench scans the commands in the Command object for variables. Only the variables found from scanning the Command Snippet are given return values. Therefore, forced substitution in parameter names will not return parameters to the WBE for further processing.


The following Command Snippet will work:

next_n=ndnext(0)

*do,j,1,5,1
*get,my_temp%j%,node,next_n,temp
next_n=ndnext(next_n)
*enddo

MY_TEMP1=MY_TEMP1
MY_TEMP2=MY_TEMP2
MY_TEMP3=MY_TEMP3

Without the last 3 lines no variables will be returned. The current implementation of Workbench cannot do this, but can be enhanced.





Show Form
No comments yet. Be the first to add a comment!