select a node with tcl

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello, could you please help me with a macro that I'm creating?

 

I just create a node with the command '*createcenternode 8000078 8000024 8000049', I want to select the node by the ID, but I don't know how can I do that since the ID will change every time I create it.

 

I tried to put the id in a variable 'set ta [*createcenternode 8000078 8000024 8000049]' but didn't work.

 

I hope that you can help me. thanks in advance.

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited December 2016

    Try the following code:

     *createcenternode 8000078 8000024 8000049 hm_createmark nodes 1 '-1' set new_node [hm_getmark nodes 1] puts 'New node ID= $new_node'