Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Automatic naming of components 2

Status
Not open for further replies.

jpblasques

Marine/Ocean
Nov 24, 2006
20
0
0
DK
Hi everyone!

I am trying to use components to organize my elements. It looks something like this:

*DO,i,1,10
ESEL,S,,,E_ARRAY(i),E2(i)
CMNAME='EL_i' <---- i should change and be stored as char
CM,CMNAME,ELEM
ALLSEL,ALL
*ENDDO

The question is I would like CMNAME to be numbered inside the do loop. Any idea how to do this? Have I explained myself well?

Thanks in advance.
 
Replies continue below

Recommended for you

You can substitute the values of parameters in ANSYS by putting % signs on each side (look for "parameter substitution" in the manual). I think yours would look something like this:

*DO,i,1,10
ESEL,S,,,E_ARRAY(i),E2(i)
CMNAME='EL_%i%'
CM,CMNAME,ELEM
ALLSEL,ALL
*ENDDO
 
Status
Not open for further replies.
Back
Top