Continue to Site

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!

Deleting a set of nodes from another set of nodes

Status
Not open for further replies.

nekovolta

Mechanical
Mar 20, 2012
8
Hi,

I have a problem with two sets of nodes (huge number of nodes). One set cointains all the nodes, and the second one contains only a group of nodes. I need to create a thrid one set, which would be: ALL NODES - SECOND SET OF NODES.

One option would be to go one by one, in the set that contains all the nodes and deleting the number node that I don't want there, but as it is a huge number of node, this is tedious and also I can make mistakes.

Does anyone know if I can do this in a more simplified way? For instance,

NSET,NSET=ALL
NSET,NSET=GROUP2

¿NSET,NSET=ALL-GROUP2?

Thank you very much!
 
Replies continue below

Recommended for you

use python, write a macro or use the interactive command line

all=[node1,node2,...,nodeN]
group2=[grnode1,grnode2, ..., grnodeN]
for i in group2:
ind=all.index(i)
all.pop(ind)
print('no thanks')

Use the .rpy file to easily see how you can access and save the nodelists, or look into the scripting manual.
 
Thank you sdebock, I don't know how to use python. I think I should learn it.

Finally, what I did was to do it in Matlab, and it worked well also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor