🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to select multiple sets ID in a TCL command?

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Dear all,
 
I'm struggling with a multiple node sets selection in TCL.
I have about 50 node sets (X nodes in each set).
I'd like to have an additional component with all the nodes which belong to my sets.
It must be generated automatically by my script as the number of nodes and sets may be different.

Usually TCL command *createmark allows to specify range of numbers i.e:

*createmark nodes 1 start-end

but id doesn't work in my case

*createmark nodes 1 'by set id' 1-50

because it selects only the first set. I tried many other ways but it seems that only code below works well:

*createmark nodes 1 'by set id' 1 2 3 4 ... 50

I can't have a fixed string [1,2,3 ... n] written there permanently as the last number may be different.

Is there any other smart way of selecting all nodes in my sets?

 

Thank you in advance.

 

Best regards

Jakub

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    yes, there is a non smart but simple way to do that  image/emoticons/default_wink.png' alt=';)' srcset='/emoticons/wink@2x.png 2x' width='20' height='20'>

    first marking your sets:

     

    *createmark sets 1 1-50

     

    then mark your nodes in those sets:

     

    eval *createmark nodes 1 {'by set id'} [hm_getmark sets 1]

     

    or hm_createmark nodes 1 'by set id' [hm_getmark sets 1]