🎉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 can I create an ordered set of elements in Hypermesh

User: "kolodrillo"
Altair Community Member
Updated by kolodrillo

I'd appreciate is someone could let me know how to use the "element list" function for creating an ordered element set.

 

When selecting not ordered, I've got the usual options to select groups of elements to create the set but the elements are not ordered.

If I choose ordered set the only possible option to select elements seems to be this "element list" where you can only click individual elements one by one...

Any idea / suggestion on a better way create ordered sets?

 

Thanks in advance

Raul

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Adriano_Koga"
    Altair Employee
    Accepted Answer
    Updated by Adriano_Koga

    Hi Adriano.

     

    Yes ascending order by ID.

     

    Any ideas on where to start with a TLC script to achieve that?

     

    Thanks

    curious about why it should be an ordered set in your case.

    A regular set, created in HM will by default add the element IDs in ascending order, already.

     

    but anyway, you could use these commands and save a .tcl file to run as a script.

    # Create a new element set
    set elementSetName [hm_getstring "Set name:"]

    # Open element selection panel
    *createmarkpanel elements 1 "select elements:"

    # Get the list of elements and their IDs
    set elementIDs [hm_getmark elements 1]
    *clearmark elements 1

    # Sort the element IDs in ascending order
    set sortedElementIDs [lsort -integer $elementIDs]

    # Create an element set of type ordered List 
    set numElements [hm_marklength elements 2]
    *createentity sets cardimage=SET_ELEM name=$elementSetName
    *setvalue sets name=$elementSetName style=1
    eval "*setvalue sets name=$elementSetName ids={elems $sortedElementIDs}"
    *setvalue sets name=$elementSetName STATUS=0 5422=LIST

    # Print a message with the name of the created element set
    puts "Element set $elementSetName created successfully!"