🎉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

Ordered node set in TCL

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

Hi everyone

I have a macro that I am writing to automate a repetitive task. I have this almost complete, however I am stuck on one thing at the moment.

I am using HM with LS-DYNA.

I have a nodal path which I have used to define an ordered node set (say node ids 25 26 27 10 50 52 60 61). I have verified that the card was generated correctly with the nodes in the correct order.

This set was copied to mark 1 (*createmark nodes 1 ....). Then I used hm_getmark to place the nodes into a tcl list.

However when I reviewed the tcl list, it was sorted from lowest to highest (eg using the above numbers: 10 25 26 27 50 52 60 61).

Any suggestions for getting the original list order into tcl. My code is below:

#=========================

*createmark nodes 1 'by set' set_name

#hm_getmark entity_type mark_id ?panel_sensitive?

set node_Ids [hm_getmark nodes 1]

#=========================

I assume that the problem is that the hm_getmark is the wrong command to use in this case, and this is where the list is sorted.

Thanks for any comments and suggestions.

Regards

Andrew Sims

ResMed

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi,

    assuming you have a pre-existing, ordered node set named 'my_set', you could retrieve the nodes with

    hm_getentityarray sets my_set nodes

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

    Thank you Stefan.

    That did the trick. I also was having a look at *createlist, but I found that your suggestion is simpler.

    Thanks again.

    Andrew Sims