Generic Table Operations

pxGetTableIDs

Gets all Table IDs list based on given table type.

List<size_t> pxGetTableIDs(String sModel, int iTableType)

return

Returns Table IDs list in an array.

sModel

Model Name.

iTableType

Type of the table. Valid Range 1-5.

1 - 2D table
2 - User Probe Table
3 – CAE Probe Table
4 – CAE Header legend 2D table
5 – CAE Abbrivation 2D table

xIsValidTable

Checks Table ID’s validity.

int xIsValidTable(size_t iTableID)

return

Returns table ID’s type. Valid Range 1-5.

0 - Invalid ID
1 - 2D table
2 - User Probe Table
3 – CAE Probe Table
4 – CAE Header legend 2D table
5 – CAE Abbrivation 2D table

iTableID

ID of the Table.

xSetTableVisible

Set table visble state.

bool xSetTableVisible(size_t iTableID, bool bShow)

return

Returns True, if successful.

iTableID

ID of the Table.

bShow

Set True to show table.

xIsTableVisible

Gets table’s visible state.

bool xIsTableVisible(size_t iTableID)

return

Returns True, if table is visible.

iTableID

ID of the Table.

xGetTableRowCount

Gets table row count.

int xGetTableRowCount(size_t iTableID)

return

Returns table row count.

iTableID

ID of the Table.

xGetTableColCount

Gets table column count.

int xGetTableColCount(size_t iTableID)

return

Returns table column count.

iTableID

ID of the Table.

xSetTableHighlighted

Sets a table in highlight mode.

bool xSetTableHighlighted(size_t iTableID, bool bHighlight)

return

Returns True, if successful.

iTableID

ID of the table to be highlighted.

bHighlight

Set True to enable highlight mode. False to dehighlight.

xIsTableHighlighted

Gets the highlight state of a table.

bool xIsTableHighlighted(size_t iTableID)

return

Returns True, if the table is highlighted.

iTableID

ID of the table.

xSetTableFont

Sets font to table.

bool xSetTableFont(size_t iTableID, int iRow, int iCol, String sFont)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field. If iRow is -1 it sets in all rows. If iCol is -1 it sets in all columns.

sFont

Font name to be set.

xGetTableFont

Gets font from table field.

String xGetTableFont(size_t iTableID, int iRow, int iCol)

return

Returns Font name of the label field. If fails returns empty String.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xSetTableFontSize

Sets Table font size.

bool xSetTableFontSize(size_t iTableID, int iRow, int iCol, int iFontSize)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field. If iRow is -1 it sets in all rows. If iCol is -1 it sets in all columns.

iFontSize

Font size. Valid range 1-72.

xGetTableFontSize

Gets font size in a label field.

int xGetTableFontSize(size_t iTableID, int iRow, int iCol)

return

Returns table field’s font size.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xSetTableTextColor

Sets table text color.

bool xSetTableTextColor(size_t iTableID, int iRow, int iCol, int iR, int iG, int iB)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field. If iRow is -1 it sets in all rows. If iCol is -1 it sets in all columns.

iR, iG, iB

RGB color values of the text color.

pxGetTableTextColor

Gets table text color in a label field.

List<int> pxGetTableTextColor(size_t iTableID, int iRow, int iCol)

return

Returns r, g, b values of the text color in an array of size 3.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xSetTableText

Set user defined text to a table field.

bool xSetTableText(size_t iTableID, int iRow, int iCol, StringsText)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

sText

Text value to be set in label field.

xGetTableText

Gets Text value from a table field.

String xGetTableText(size_t iTableID, int iRow, int iCol)

return

Return Text set in the label field.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xSetTableBackground

Sets table labels background color.

bool xSetTableBackground(size_t iTableID, int iRow, int iCol, float r, float g, float b)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field. If iRow is -1 it sets in all rows. If iCol is -1 it sets in all columns.

r, g, b

RGB values of the background color.

pxGetTableBackground

Gets background color from a table label field.

List<float> pxGetTableBackground(size_t iTableID, int iRow, int iCol)

return

Returns background color rgb values in an array of size 3. If fails, returns empty array.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xShowTableBackground

bool xShowTableBackground(size_t iTableID, bool bShow)

return

Returns True, if successful.

iTableID

ID of the Table.

bShow

Set True to show table background.

xIsTableBackgroundVisible

Gets table background visible state.

bool xIsTableBackgroundVisible(size_t iTableID)

return

Returns True, if background is visible.

iTableID

ID of the Table.

pxGetTableFieldCAEInfo

Gets table label fields associated CAE info like Model, Result, Instance and derived result.

List<String> pxGetTableFieldCAEInfo(size_t iTableID, int iRow, int iCol)

return

Returns CAE field info of a label in an String array.

If array size is 4, then

retArray[0] = Model name
retArray[1] = Result name
retArray[2] = Instance name
retArray[3] = Derived Result name

If arrray size is 1 then

retArray[0] = Model name

If array is empty invalid field.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xUpdateTableDimensions

Fits and aligns table.

bool xUpdateTableDimensions(size_t iTableID)

iTableID

ID of the Table.

pxGetHitTableID

Returns table ID info currently selected.(Alt + Mouse double Click).

List<size_t> pxGetHitTableID()

return

If hit table exists, it returns array of size 4 with following details.

retArray[0] = Hit table ID
retArray[1] = Hit row
retArray[2] = Hit column
retArray[3] = Table Type

Table Type:

1 - 2D table
2 – User 3D probe table
3 – CAE Probe Table
4 - CAE Header Legend 2D table
5 – CAE Abbrivation 2D Table

xGetTableCellType

Gets a table’s cell type.

int xGetTableCellType(size_t iTableID, int iRow, int iCol)

return

Returns table cell type. Negative number when fails.

1 - Simple Cell
2 - Result name Cell
3 - Result Value Cell
4 - ID Cell
5 - Header Cell
6 - Model Cell
7 - Part Cell
8 - Rank Cell
9 - Envelop Cell, for future use
10- Result Text Cell

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

xSetTableBorderCol

Sets table labels border line color.

bool xSetTableBorderCol(size_t iTableID, int iRow, int iCol, float r, float g, float b)

return

Returns True, if successful.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field. If iRow is -1 it sets in all rows. If iCol is -1 it sets in all columns.

r, g, b

RGB values of the border color.

pxGetTableBorderCol

Gets background color from a table label field.

List<float> pxGetTableBorderCol(size_t iTableID, int iRow, int iCol)

return

Returns border color rgb values in an array of size 3. If fails, returns empty array.

iTableID

ID of the Table.

iRow, iCol

Row and column of the label field.

pxGetTablePos

Gets table position in normalized screen coordinates (0 to 1).

List<float> pxGetTablePos(size_t iTableID)

return

Returns an empty array, if failed.

Returns an array of 2 values, if success.

retArray[0] = normalized postion from screen left (0 to 1)
retArray[1] = normalized postion from screen top (0 to 1)

iTableID

Table Id.

xSetTablePos

Sets table position for the given normalized screen coordinates (0 to 1).

bool xSetTablePos(size_t iTableID, float xPos, float yPos)

return

Returns False, if failed.

Returns True, if success.

iTableID

Table Id

xPos

Relative position from left of viewport (0 to 1).

yPos

Relative position from left of viewport (0 to 1).

pxGetTableDimensionEx

Gets table width and height in normalized screen coordinates (0 to 1).

List<float> pxGetTableDimensionEx(size_t iTableID)

return

Returns an empty array if failed

Returns an array of 2 values if success.

retArray[0]= normalized width (0 to 1)
retArray[1]= normalized height (0 to 1)

iTableID

Table Id.

pxGetTextBound

Gets bound rectangle dimension for the given text and font size. User can get absolute dimension or normalized dimension based on the flag bNormalized.

List<float> pxGetTextBound(String sText, String FontFace, int iFontSize, bool bNormalized)

return

Returns an empty array if failed

Returns an array of 2 values if success.

retArray[0] = width
retArray[1] = height

sText

Text to be displayed.

FontFace

Font face or family name.

iFontSize

Font size.

bNormalized

Absolute width and height if this flag is False.

Relative or normalized width and height if this flag is True.

xDeleteAllTables

Deletes all tables of given type for a model.

xDeleteAllTables(String sModel, int iTableType, bool bOnlyHidden=False)

Return

Returns True, if successful.

sModel

Model Name.

iTableType

Types and index value of the tables are,

1 - 2D Table
2 - User Probe Table
3 – CAE Probe Table
4 – CAE Header Legend 2D Table
5 – CAE Abbrivation 2D Table

bOnlyHidden

Set True, to delete only all labels that are not displayed.

xConvertProbeTablesAsUserTables

Converts probe tables as user tables in a model. This will give user flexblilty to edit some fields.

bool xConvertProbeTablesAsUserTables(String sModel, String sPart)

return

Returns True, if successful.

sModel

Model name. If it is empty, all model’s probe tables will be converted as user tables.

sPart

Probe tables associated part name. If it is empty, probe Tables of all the parts in the model will be converted.

xConvertProbeTableAsUserTable

Converts a ProbeTable as user table.

size_t xConvertProbeTableAsUserTable(size_t iTableID)

return

Returns new table ID.

iTableID

Table ID that to be converted. After conversion this iTableID becomes invalid.

xSetTableTextAlignment

Sets a text alignement to specific cell of table.

bool xSetTableTextAlignment(size_t iTableID, int iRow, int iCol, int iAlign)

return

Returns True, if succeeds.

Returns False otherwise.

iTableID

Table id.

iRow

Table row number.

iCol

Table column number.

iAlign

Align option, (0 to 3)

0 – Left
1 – Center
2 – Right
3 - Justify

xGetTableTextAlignment

Gets a text alignement of a specific cell of table.

int xGetTableTextAlignment(size_t iTableID, int iRow, int iCol)

return

Returns alignment option as integer (0-3).

Returns -1 if fails.

0 – Left
1 – Center
2 – Right
3 - Justify

iTableID

Table id.

iRow

Table row number.

iCol

Table column number.

xSet2DLabelKey

Sets the key that will be associated with a 2D label.This key can be used to search for and retrieve a label ID at a later time.

bool xSet2DLabelKey(size_t iLabelID, String sKey)

return

Returns True if successful. False when failed.

iLabelID

2D Label ID for that a user specified key has to be associated.

sKey

Key text, that to be set to the 2D label.

xGet2DLabelKey

Gets the key associated with a 2D label. This key can be used to check for the right table ID.

String xGet2DLabelKey(size_t iLabelID)

return

Returns the key associated with 2D label Id if successful. Empty string when failed.

iLabelID

2D label ID, for that the key is required.

xGet2DLabelID

Gets the 2D label ID that is associated with a key.

size_t xGet2DLabelID(String sKey)

return

Returns positive number when successful. 0 or negative number when failed.

sKey

User specified Key value

pxGet2DLabelIDs

Gets the list of 2D labels ID that is associated with the user specified key.

List<size_t> pxGet2DLabelIDs(String sKey)

return

Returns the list if 2D label IDs that is associated with the given key

sKey

User specified Key value

xSet3DLabelKey

Sets the key that will be associated with a 3D label.. This key can be used to search for and retrieve a label ID at a later time.

bool xSet3DLabelKey(size_t iLabelID, String sKey)

return

Returns True if successful. False when failed.

iLabelID

3D Label ID for that a user specified key has to be associated.

sKey

Key text, that to be set to the 3D label

xGet3DLabelKey

Gets the key, that is associated with a 2D label.

String xGet3DLabelKey(size_t iLabelID)

return

Returns the key associated with 2D label Id if successful. Empty string when failed.

iLabelID

3D Label ID, for that the key is required.

xGet3DLabelID

Gets the 3D label ID that is associated with a key.

size_t xGet3DLabelID(String sKey)

return

Returns 3D label ID as a positive number when successful. 0 or negative number when failed.

sKey

User specified Key value

pxGet3DLabelIDs

Gets the 3D label ID that is associated with a key.

List<size_t> pxGet3DLabelIDs(String sKey)

return

Returns associated 3D label ids in an array.

sKey

User specified Key.

xSet2DTableKey

Sets the key that will be associated with a 2D table. This key can be used to search and fetch a table ID at a later time.

bool xSet2DTableKey(size_t iTableID, String sKey)

return

Returns True if successful. False when failed.

iTableID

2D Table ID for that a user specified key has to be associated.

sKey

Key text, that to be set to the 2D Table

xGet2DTableKey

Gets the key that is associated with the 2D Table. This key can be used to search and fetch a table ID at a later time.

String xGet2DTableKey(size_t iTableID)

return

Returns the key associated with 2D table ID, if successful. Empty string when failed.

iTableID

2D table ID, for that the key is required.

xGet2DTableID

Gets the 2D table ID that is associated with a key.

size_t xGet2DTableID(String sKey)

return

Returns 2D table ID as a positive number when successful. 0 or negative number when failed.

sKey

User specified Key value for that the associated 2D table ID is required.

pxGet2DTableIDs

Gets the 2D table ID that is associated with a key.

List<size_t> pxGet2DTableIDs(String sKey)

return

Returns associated 3D table ids in an array.

sKey

User specified Key value.

xSet3DTableKey

Sets the key that will be associated with a 3D table.. This key can be used to search and fetch the tableID later time.

bool xSet3DTableKey(size_t iTableID, String sKey)

return

Returns True if successful. False when failed.

iTableID

3D Table ID for that a user specified key has to be associated.

sKey

Key text, that to be set to the 3D Table.

xGet3DTableKey

Set a key used to associate with a 3D Table. This key can be used to search and fetch the tableID later time.

String xGet3DTableKey(size_t iTableID)

return

Returns the key associated with a 3D table Id, if successful. Empty string when failed.

iTableID

3D table ID, for that the key is required.

xGet3DTableID

Gets the 3D tablel ID that is associated with a key.

size_t xGet3DTableID(String sKey)

return

Returns 3D table ID as a positive number when successful. 0 or negative number when failed.

sKey

User specified Key value for that the associated 3D label ID is required.

pxGet3DTableIDs

Gets the 3D table IDs that are associated with a key.

List<size_t> xGet3DTableID(String sKey)

return

Returns associated 3D tables ids in an array.

sKey

User specified Key value.

xSetImageLabelKey

Sets the key that will be associated with an image label.. This key can be used to search and fetch the image label ID in later time.

bool xSetImageLabelKey(size_t iLabelID, String sKey)

return

Returns True if successful. False when failed.

iLabelID

Image label ID for that a user specified key has to be associated.

sKey

Key text, that to be set to the Image label.

xGetImageLabelKey

Gets the key that is associated with the image label ID.

String xGetImageLabelKey(size_t iLabelID)

return

Returns the key associated with a image label Id, if successful. Empty string when failed.

iLabelID

Image label ID, for that the key is required.

xGetImageLabelID

size_t xGetImageLabelID(String sKey)

return

Returns Image label ID as a positive number when successful. 0 or negative number when failed.

sKey

User specified Key value for that the associated image label ID is required.

pxGetImageLabelIDsFromKey

Gets the image label IDs that are associated with a key.

List<size_t> pxGetImageLabelIDsFromKey(String sKey)

return

Returns associated image label ids in an array.

sKey

User specified Key value.

pxGetImageLabelIDs

Gets the image label IDs base on its type.

List<size_t> pxGetImageLabelIDs(int iImageLabelType)

return

Returns associated image label ids in an array.

iImageLabelType

Gets ImagelabelID based on following values.

0 All image label IDs

1 2D Absolute type imagelabel IDs

2- 2D Relative type imagelabel IDs

3- 3D part attached Imagelabel IDs.

pxGetTableCellDimension

Gets the size or dimension of a table cell specified by table id, row and coloum indices.

List <float> pxGetTableCellDimension(size_t iTableID, int iRow, int iColumn)

return

Returns an real value array of size 2.

Array[0] - width of cell

Array[1] - height of cell

Returns an empty array if failed by any case.

iTableID

Table ID

iRow

Row index of the cell

iColumn

Column index of the cell

xSetTableBorderVisibility

Sets table border.

bool xSetTableBorderVisibility(size_t iTableID, bool bShow)

return

Returns True if valid ID.

iTableID

TableKey

bShow

Set True to display the border

Set False to hide the border

xGetTableBorderVisibility

Gets state of the table border.

bool xGetTableBorderVisibility(size_t iTableID)

return

Returns border visbilty.

iTableID

TableKey

xIsValid2DTableID

Validates a 2D table ID.

bool xIsValid2DTableID(size_t iTableID)

return

Returns True if it’s a valid 2D table ID.

iTableID

Table ID to validate.

xIsValidProbeTableID

Validates a probe table ID.

bool xIsValidProbeTableID(size_t iTableID)

return

Returns True if it’s a valid probe table ID.

iTableID

Table ID to validate.

xSetLabelZOrder

Sets z order for a label.

bool xSetLabelZOrder(size_t iLabelID, float iZOrder)

return

Returns True if successful.

iLabelID

Label ID

iZOrder

Set 0 to render it in foregroud(On the top geometry)

Set 1 to render it in background(Behind scene )

xGetLabelZOrder

Gets z order of a label.

float xGetLabelZOrder(size_t iLabelID)

return

Returns z order flag set. Returns 0 if it is rendered in foreground

Returns 1 if it is rendered in background(behind scene).

iLabelID

Label ID

pxGetImageLabelIDsFromKey

Gets the image label IDs that are associated with a key.

List<size_t> pxGetImageLabelIDsFromKey(String sKey)

return

Returns associated image label ids in an array.

sKey

User specified Key value.