Creating Attributes

The AttrPutS function assigns a value to a string element attribute. If you want to assign the string Europe to the Continent attribute of the region Sweden in the NewDim dimension, you would write the AttrPutS function this way:

AttrPutS('Europe','NewDim','Sweden','Continent');

Procedure

  1. Open the Attributes process in TurboIntegrator.

    You might have to edit the data source to point to region.csv in your TI_data directory. If you change the data source, you will be prompted to specify how process variables should be handled. Select Keep All Variables.

  2. Click the Variables tab.

    Note that V4 and V5 have been identified as Attribute.

  3. Click the Formula cell for V5.

    It reads V5=V0|V4;

    This formula concatenates the values of the V4 and V5 variables.

  4. Click the Maps tab and the Attributes sub-tab.

    The attribute type for variable V4 has been defined as Text and the type for V5 as Alias.

  5. Click the Advanced tab and the Data sub-tab to show the generated statements and two additional statements.
    #****GENERATED STATEMENTS START****
    V5=v0|v4; 
    AttrPutS(V4,'newdim',V0,'continent');
    AttrPutS(V5,'newdim',V0,'cont');
     #****GENERATED STATEMENTS FINISH****
    AttrPutS(V4,'newdim',V1,'continent');
    AttrPutS(V4,'newdim',V2,'continent');

    The two statements above were added manually because V1 and V2 were not declared as contents in the Variables tab. They must, however, be assigned the text attribute Continent.

  6. Save and execute the Attributes process.