How to put all elements one by one to named selection by apdl?
How to put all elements one by one to named selection by apdl?
(OP)
If someone can do it in apdl, please tell me the command script.
Thank you very much.
Thank you very much.





RE: How to put all elements one by one to named selection by apdl?
Do you want to select all elements together or individually and assign named selection to each? You can use named selection with scoping method=worksheet to achieve both options.
RE: How to put all elements one by one to named selection by apdl?
Actually I want to select individually and assign named selection to each.
And I want to do it with one click or speedy way.
Can you explain scoping method?
Thank you very much.
RE: How to put all elements one by one to named selection by apdl?
You cannot do it in one click. You need to do it by hard way by assigning values of element ID in worksheet. At least I do not know any good straight forward way to achieve this. Scoping method is where you achieve selection by actually selecting or by providing parameters in worksheet. For example following snap shows selection of element with id no 1 using worksheet as scoping method. So now if you have some thousand elements you need to create thousand named selections by each time changing the element id no for each new named selection.
RE: How to put all elements one by one to named selection by apdl?
ecount=elmiqr(0,13)
cm,elements,elem
*do,enum,1,ecount
*get,enummin,elem,0,num,min
esel,s,elem,,enummin
cm,elem%enum%,elem
cmsel,s,elements
esel,u,elem,,enummin
cm,elements,elem
*enddo
Rick Fischer
Principal Engineer
Argonne National Laboratory
RE: How to put all elements one by one to named selection by apdl?
I was thinking in same line to use *do and *enddo loop. But stuck with how to change the name of component. This seems to be easy way. I am not hardcore user of APDL anyway.
Your macro works excellently in the Ansys APDL but not in Workbench Mechanical using command snippet beacause component and named selection are not same thing for both environments. One need to adopt hard way as I described in earlier post for workbench, I guess. What do you feel?
Please could you suggest some good resources for learning APDL command for APDL and workbench. Do you Automate by using scripting language in workbench? If yes please provide any good resources to start.
RE: How to put all elements one by one to named selection by apdl?
You can still make it work even if your named selection has the wrong entities. For instance, if you want the nodes on the face of surface body, make the face a named selection. You should get elements in your named selection. Then in MAPDL:
cmsel,s,named_selection
nsle,s,1
cm,named_selection,node
Rick Fischer
Principal Engineer
Argonne National Laboratory
RE: How to put all elements one by one to named selection by apdl?
What I really mean is-Ansys APDL treats named selection of WB as component and WB writes out information in terms of element and nodal information but not geometry. IMHO WB never treats components of APDL as named selection since it write information neither in terms of geometry nor in terms of element/nodes. WB simply ignore the component related command and never return information in form of named selection.
If both are same then why above commands are not working and resulting in workbench as named selection in the form of elements.
RE: How to put all elements one by one to named selection by apdl?
Rick Fischer
Principal Engineer
Argonne National Laboratory