Attribute Table Operator
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpAttributeTableOperator |
| Module | cenpylib.CENPyOlpAttributeTableOperator |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 18 |
Quick Start
# Boilerplate Example
attributeTableOperator = ... # obtained from the runtime context
result = attributeTableOperator.GetLoggerOperator()Method Index
| Method | Returns | Summary |
|---|---|---|
GetLoggerOperator | CENPyOlpLogOperator | Get logger operator. |
GetTableName | str | Get name of the table. |
AddRow | int | Add a row. |
GetColumnType | int | Get type of the given column. |
GetColumnName | str | Get name of the given column. |
GetColumnSize | int | Get number of the columns. |
GetRowSize | int | Get number of the rows. |
GetCell | Any | Get cell by the column and row number. |
GetCellType | int | Get the cell type by the column and row number. |
GetImportFilePath | str | Get full path of the import file. |
SetCell | — | Set the cell with a value. |
GetRowNumberById | int | Get row number of the row with specified ID (REQUIRES: First column has to be an ID). |
GetRowValuesById | list | Get row values of the row with specified ID (REQUIRES: First column has to be an ID). |
GetRowValues | list | Get row values of the row with specified index. |
DeleteRow | — | Delete a row in this table. |
DeleteAllRows | — | Delete all existing rows of this table. |
GetColumnValueType | int | Get attribute type of column. |
GetCellValueType | int | Get attribute type of the cell. |
Query Methods
GetLoggerOperator
def GetLoggerOperator() -> CENPyOlpLogOperatorGet logger operator.
Returns: CENPyOlpLogOperator — Logger operator.
GetTableName
def GetTableName() -> strGet name of the table.
Returns: str — Table name.
GetColumnType
def GetColumnType(columnNumber: int) -> intGet type of the given column.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Number of the column to get the type of (numbers start with 0). |
Returns: int — Column type.
GetColumnName
def GetColumnName(columnNumber: int) -> strGet name of the given column.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Number of the column to get the name of (numbers start with 0). |
Returns: str — Column name.
GetColumnSize
def GetColumnSize() -> intGet number of the columns.
Returns: int — Columns number.
GetRowSize
def GetRowSize() -> intGet number of the rows.
Returns: int — Rows number.
GetCell
def GetCell(columnNumber: int, rowNumber: int) -> objectGet cell by the column and row number.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Number of the column. |
rowNumber | int | Number of the row. |
Returns: Any — Cell object.
GetCellType
def GetCellType(columnNumber: int, rowNumber: int) -> intGet the cell type by the column and row number.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Number of the column. |
rowNumber | int | Number of the row. |
Returns: int — None
GetImportFilePath
def GetImportFilePath() -> strGet full path of the import file.
Returns: str — Full path of the import file.
GetRowNumberById
def GetRowNumberById(id: str) -> intGet row number of the row with specified ID (REQUIRES: First column has to be an ID).
Parameters:
| Name | Type | Description |
|---|---|---|
id | str | Row ID. |
Returns: int — Row number, -1 if row not found.
GetRowValuesById
def GetRowValuesById(id: str) -> listGet row values of the row with specified ID (REQUIRES: First column has to be an ID).
Parameters:
| Name | Type | Description |
|---|---|---|
id | str | Row ID. |
Returns: list — Values object of the desired row.
GetRowValues
def GetRowValues(row: int) -> listGet row values of the row with specified index.
Parameters:
| Name | Type | Description |
|---|---|---|
row | int | Row index. |
Returns: list — Values object of the desired row.
GetColumnValueType
def GetColumnValueType(columnNumber: int) -> intGet attribute type of column.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Column number to get attribute type of. |
Returns: int — Attribute type of column.
GetCellValueType
def GetCellValueType(columnNumber: int, rowNumber: int) -> intGet attribute type of the cell.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Column number of the cell. |
rowNumber | int | Row number of the cell. |
Returns: int — Attribute type of the cell.
Mutation Methods
AddRow
def AddRow() -> intAdd a row. Cell values are filled with default values (int: 0; double: 0.0; bool: false; string: "").
Returns: int — Size of created row array.
SetCell
def SetCell(columnNumber: int, rowNumber: int, pyValue: object)Set the cell with a value.
Parameters:
| Name | Type | Description |
|---|---|---|
columnNumber | int | Number of the column. |
rowNumber | int | Number of the row. |
pyValue | Any | Desired value. |
DeleteRow
def DeleteRow(index: int)Delete a row in this table.
Parameters:
| Name | Type | Description |
|---|---|---|
index | int | Index of the row to delete. |
DeleteAllRows
def DeleteAllRows()Delete all existing rows of this table. So that there are only columns.
Related Types
Version Notes
This class is documented as of release R2025.2.4.