Python scripting - Objects

CENPyOlpAttributeTableOperator

 

Methods

 

 

GetTableName(): string

 

o

return

current name of the table attribute

 

Get name of corresponding table attribute.

 

[Example]

tableName = tableOperator.GetTableName()

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Logger operator

 

Gets attribute logger operator

[Example]

logger = tableOperator.GetLoggerOperator()

 


 

AddRow(): int

 

o

return

number of rows (inclusive new one)

 

Adds new row to the corresponding table attribute. Cells will be filled with default values. (int: 0; double: 0.0; bool: false; string: "")

 

[Example]

amountRows = tableOperator.AddRow()

 


 

GetColumnType(columnNumber: int): ColumnType

 

o

columnNumber

number of column to get the type of

 

o

return

type of column

 

Gets the type of a specific column.

 

[Example]

typeOfFirstColumn = tableOperator.GetColumnType(0)

 


 

GetColumnName(columnNumber: int): string

 

o

columnNumber

number of column to get the name of

 

o

return

name of column

 

Gets the name of a specific column.

 

[Example]

nameOfFirstColumn = tableOperator.GetColumnName(0)

 


 

GetColumnSize(): int

 

o

return

number of columns

 

Get the number of columns of the corresponding table attribute.

 

[Example]

amountColumns = tableOperator.GetColumnSize()

 


 

GetRowSize(): int

 

o

return

number of rows

 

Get the number of rows of the corresponding table attribute.

 

[Example]

amountRows = tableOperator.GetRowSize()

 


 

GetCell(columnNumber: int, rowNumber: int): object

 

o

columnNumber

specific column

 

o

rowNumber

specific row

 

o

return

value of specific cell (int, double, bool or string)

 

Gets value of a specific cell.

 

[Example]

valueOfFirstRowAndColumn = tableOperator.GetCell(0,0)

 


 

SetCell(columnNumber: int, rowNumber: int, value: object)

 

o

columnNumber

specific column

 

o

rowNumber

specific row

 

o

value

value for specific cell (int, double, bool or string)

 

Sets value of a specific cell. Value has to be the same type as the column.

 

[Example]

tableOperator.SetCell(0,0,"test")

 


 

GetCellType(columnNumber: int, rowNumber: int): ColumnType

 

o

columnNumber

specific column

 

o

rowNumber

specific row

 

o

return

type of specific cell

 

Gets type of a specific cell.

 

[Example]

typeOfCell = tableOperator.GetCellType(0,0)

 


 

GetImportFilePath(): string

 

o

return

Path to a file which should be imported

 

Gets importFilePath of corresponding table attribute.

 

[Example]

importFilePath = tableOperator.GetImportFilePath()

 


 

GetRowNumberById(id: string): int

 

o

id

ID of row

 

o

return

Row index

 

Gets row index of corresponding table attribute where the ID matches the row ID. If there is no row with the given ID then -1 will be returned.

 

[Example]

rowNumber = tableOperator.GetRowNumberById("ID")

 


 

GetRowValuesById(id: string): list

 

o

id

ID of row

 

o

return

List with all objects/values of the specific row

 

Gets all values of the specific row with the given ID of the corresponding table attribute.

 

[Example]

values = tableOperator.GetRowValuesById("ID")

 


 

GetRowValues(rowIndex: int): list

 

o

rowIndex

Index of a specific row

 

o

return

List with all objects/values of the specific row

 

Gets all values of the specific row of the corresponding table attribute.

 

[Example]

values = tableOperator.GetRowValues(0)

 


 

DeleteRow(rowIndex: int)

 

o

rowIndex

Index of a specific row

 

Deletes row at the given index.

 

[Example]

tableOperator.DeleteRow(0)

 


 

DeleteAllRows()

 

Deletes all rows of the corresponding table attribute.

 

[Example]

tableOperator.DeleteAllRows()

 


 

GetColumnValueType(columnNumber: int): ATTRIBUTE_TYPE

 

o

columnNumber

Number of a specific column

 

o

return

Attribute type of this column

 

Gets attribute type of column.

 

[Example]

type = myTable.GetColumnValueType(0)

 


 

GetCellValueType(columnNumber: int, rowNumber: int): ATTRIBUTE_TYPE

 

o

columnNumber

Number of a specific column

 

o

rowNumber

Number of a specific row

 

o

return

Attribute type of this column

 

Gets attribute type of cell.

 

[Example]

type = myTable.GetCellValueType(0,0)

 


 


Previous
Previous page
Chapter
Chapter page
Next
Next page