slumdogengineer
Mechanical
- Jan 23, 2009
- 35
Hi all,
I am wondering if anyone knows how to automatically named components in a *do loop?
For example, say you have a number of areas, and each area is meshed with shells. What I want to do is, inside a *do loop, automatically select the nodes from each area, then name it "areanodes1" for area 1, "areanodes2" for area 2 and so on. The code would look something like this:
*do,areanumber,1,20 !Cycle through 20 areas
asel,,,,areanumber !Select area
nsla !Select nodes from area
cm,areanodes#1#,node !Make component from nodes
*enddo
You can see that what I want to do, is subsitute the loop number in the name of the component (where I have put the # signs), so that I end up with areanodes1, areanodes2 etc.
Does anyone know how to do this, or indeed if it is possible?
Many thanks,
Will
I am wondering if anyone knows how to automatically named components in a *do loop?
For example, say you have a number of areas, and each area is meshed with shells. What I want to do is, inside a *do loop, automatically select the nodes from each area, then name it "areanodes1" for area 1, "areanodes2" for area 2 and so on. The code would look something like this:
*do,areanumber,1,20 !Cycle through 20 areas
asel,,,,areanumber !Select area
nsla !Select nodes from area
cm,areanodes#1#,node !Make component from nodes
*enddo
You can see that what I want to do, is subsitute the loop number in the name of the component (where I have put the # signs), so that I end up with areanodes1, areanodes2 etc.
Does anyone know how to do this, or indeed if it is possible?
Many thanks,
Will