Use of *linemesh_preparenodeslist1 1 2

Phil_DA
Phil_DA Altair Community Member

Hi

I want to use the tcl command *linemesh_preparenodeslist1 on a set of nodes that are currently contained in a list "curr_weld".

"curr_weld" contains the list of numbers "143 142 176 177 178 179 180 181 182 183 184 412 413 414 415 416 417 229 228 227 226 225 224 223 222 221 147 146 145 144"

What command do I need to use to get the nodes in curr_weld onto the mark 1 so that the *linemesh_preparenodeslist1 will work?

I've tried *createmark nodes 1 $curr_weld, but this just seems to assign the first number to the mark.

Thanks

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Michael Herve
    Michael Herve
    Altair Employee
    Answer ✓

    thanks @Phil_DA

    may I ask you to validate my previous comment as the answer for your request? This way it may help other users to be redirected to relevant content

    Regards,

    Michael

Answers

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @Phil_DA,

    *linemesh_preparenodeslist1 requires a HyperMesh list, which is different of a mark. A mark is non order, whereas a lisr is ordered, and can be populated with *createlist.

    That said, it seems you are trying to set an automation for connection purposes. I would recommend you to look at our Connectors, which offer many capabilities in core, and which you cn rely on for automation.

    Best Regards,

    Michael

  • Phil_DA
    Phil_DA Altair Community Member

    Hi Michael

    Thanks for answering my question.

    In this case I'm not looking at connectors, I'm trying to write a script to enable me to create plot elements along a list of node numbers, where the list of nodes is contained in an existing list "curr_weld"

    I think I need to prep the node list using *linemesh_preparenodeslist1 1 2, before I can use the "linemesh_saveparameters" and "*linemesh_savedata1 1 2 0 0" commands to create the plot elements?

    The trouble is I can't get the "*linemesh_preparenodeslist1 1 2" to work (it just returns 0). I am assuming it is because it doesn't recognise the list "curr_weld"?

    I've just tried this code:

    set curr_weld "143 142 176 177 178 179 180 181 182 183 184 412 413 414 415 416 417 229 228 227 226 225 224 223 222 221 147 146 145 144"
    *createlist nodes 1 $curr_weld
    *linemesh_preparenodeslist1 1 2

    … but this doesn't work either. Not sure what I'm doing wrong?

    Regards

    Phil

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @Phil_DA ,

    do you want to create a plot element between node 143 and 142, then between 142 and 176, …

    Are they aligned along elements edges, or do they belong o face to face parts?

    Best Regards,

    Michael

  • Phil_DA
    Phil_DA Altair Community Member

    Yes, exactly that. The nodes are aligned along a component edge at a weld junction along element edges. The list is in order, so the plots would be created correctly.

    Regards

    Phil

  • Michael Herve
    Michael Herve
    Altair Employee

    hello again,

    there is a frequent hint with *createmark, which you need to consider for *createlist too

    if you write

    set curr_weld "143 142 176 177 178 179 180 181 182 183 184 412 413 414 415 416 417 229 228 227 226 225 224 223 222 221 147 146 145 144"

    *createmark nodes 1 $curr_weld

    the mark will contain only node 143. You need to use eval *createmark nodes 1 $curr_weld to pass all the content of the list to *createmark

    I assume same should apply to *createlist, can you please use

    eval *createlist nodes 1 $curr_weld

    Best Regards,

    Michael

  • Phil_DA
    Phil_DA Altair Community Member

    Hi Michael

    Got it. Just needed to add eval in from of the *createlist command and it works.

    Thanks for your help on this.

  • Michael Herve
    Michael Herve
    Altair Employee
    Answer ✓

    thanks @Phil_DA

    may I ask you to validate my previous comment as the answer for your request? This way it may help other users to be redirected to relevant content

    Regards,

    Michael

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.