@gettablecolumntype()

Returns the type ID of a column in a table.

Syntax

@gettablecolumntype (table_id, column_index)

Type

HyperMesh Template Function

Description

This function returns the type ID of a column in a table. This can be used both inside and outside of a *tables() block. The following values are valid for return:
  • 1 - integer
  • 2 - unsigned integer/entity ID
  • 3 - float
  • 4 - double
  • 5 - bool
  • 6 - string
  • 7 - triple

Inputs

table_id
The ID of the table.
column_index
The index of the column in the table, starting from 0.

Example

*tables()
    *format()
        *counterset(counter1,0)
        *variableset(variable1,columns)
        *loopif([counter1 < variable1])
            *counterset(counter2,0)
            *variableset(variable2,[@gettablecolumnsize(id,counter1)])
            *loopif([counter2 < variable3])
                *variableset(variable3,[@gettablecolumntype(id,counter1)]) 
                *if([variable3 == 7])
                    *field(real,[@getcelltriplevalue(counter2,counter1,0)],0)
                    *string(" ")
                    *field(real,[@getcelltriplevalue(counter2,counter1,1)],0)
                    *string(" ")
                    *field(real,[@getcelltriplevalue(counter2,counter1,2)],0)
                    *end()
                *endif()
                *counterinc(counter2)
            *endloop()
            *counterinc(counter1)
        *endloop()
*output()

Version History

11.0