*createmark nodes PROBLEM for MPC generation

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

Dear all,

 

This is my first post, if it is not in the good forum please excuse me.

 

I am trying to set up a program written in TCL to generate MPC equations with specific nodes that will have been selected by the user.

 

I managed to create a variable which reference all nodes IDs that I need to generate the MPC. Example:   $UniqueList is the variable that contains these values associated to nodes (3 of them here) IDs: 2 3 47.

 

This is an example of script for an MPC generation of 3 nodes connected to 1 master node:

 

  *createmark nodes 1 33-35

  *createarray 3 13 13 13

  *createdoublearray 18 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23 1.23

  *equationcreate 1 1 3 1 18 85 5 1.23 5.0

 

The PROBLEM:

 

My list of nodes ID will be random and therefore the problem is that the command '  *createmark nodes 1 $UniqueList   ' doesn't work because the program doesn't read each value as it is and therefore I get a problem in the equation.

 

I would be very thankful if someone could give me the right script to use to create the mark for the nodes. Thanks in advance.

 

Tagged:

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited September 2017

    If :

      *createmark nodes 1 $UniqueList

    does not work, so try following code:

      eval *createmark nodes 1 $UniqueList

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Thanks Nguyen-Dai,

    I tested the code and the proper way I found was this:

     

    eval *createmark nodes 1 {'by id only'} $uniqueList

  • tinh
    tinh Altair Community Member
    edited September 2017

    if there is no 'by id only' => means next args are ids, because nodes have no name!