Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing index (%i%) in *do loop in Workbech

Status
Not open for further replies.

student2022

Mechanical
Dec 16, 2022
1
MY
I am stuck in coding/scripting in ANSYS Workbench. I am trying to print/insert the index of a *do loop. The Python command %i% works in ANSYS APDL but not in Workbench. Any alternative, please

*do,i,1,10,1
*get,stress(%i%),....
*enddo

I expect to get:

stress (1)
stress (2)
stress (3)
.
.
.
stress (10)
 
Replies continue below

Recommended for you

Hello there,
try this and let me know.

Code:
*del,stress,,nopr
*dim,stress,array,10
*do,i,1,10,1
[indent]*get,stress(%i%),node,i,loc,x[/indent]
*enddo

Best regards
Jiri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top