Loop over component members
Loop over component members
(OP)
Hallo everybody,
Is it possible to perform a loop over the nodes or the elements of a selected component?
Thanks,
andrea
Is it possible to perform a loop over the nodes or the elements of a selected component?
Thanks,
andrea
-------------------------------------------
Andrea Mordini, Civil Engineer, Ph.D.
http://www.andreamordini.com
-------------------------------------------





RE: Loop over component members
-Brian
RE: Loop over component members
Of course it is possible. I'm not sure if I understand wright what you mean but I'll give it a try:
CODE
nd=ndnext(0)
*dowhile,nd
! do something
nd=ndnext(nd)
*enddo
Regards,
Alex
RE: Loop over component members
andrea
-------------------------------------------
Andrea Mordini, Civil Engineer, Ph.D.
http://www.andreamordini.com
-------------------------------------------
RE: Loop over component members
asel,,,,temp1
nsla,,1
*get,_nnode,node,,count
*get,_nmin,node,,num,min
*do,ii,1,_nnode
nsel,,,,_nmin
asel,,,,temp2
nsla,,1
_nslave=nnear(_nmin)
nsel,none
nsel,,,,_nmin
nsel,a,,,_nslave
cp,next,all,all
asel,,,,temp1
nsla,,1
_nmin=ndnext(_nmin)
*enddo
_nnode=
_nmin=
_nslav=
This is a macro I use for coupling two adjacent regions by definining area components, temp1 and temp2.
-Brian