TableEditorDefaultDataProvider Class

class NXOpen.TableEditorDefaultDataProvider

Bases: NXOpen.Builder, NXOpen.ITableEditorDataProvider

Provides basic data for a Table Editor block.

To create a new instance of this class, use NXOpen.Session.CreateTableEditorDefaultDataProvider

New in version NX10.0.0.

Properties

Property Description
ColumnCount Returns or sets the number of columns in the table
RowCount Returns or sets the number of rows in the table
Tag Returns the Tag for this object.

Methods

Method Description
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetObject Returns the object currently being edited by this builder.
GetString Gets the string data at a particular location in the table @return the string data at the row and column specified
SetString Sets string data at a particular location in the table.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Property Detail

ColumnCount

TableEditorDefaultDataProvider.ColumnCount

Returns or sets the number of columns in the table

-------------------------------------

Getter Method

Signature ColumnCount()

Returns:the number of columns in the table
Return type:int

New in version NX10.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ColumnCount(columnCount)

Parameters:columnCount (int) – the number of columns in the table

New in version NX10.0.0.

License requirements: None.

RowCount

TableEditorDefaultDataProvider.RowCount

Returns or sets the number of rows in the table

-------------------------------------

Getter Method

Signature RowCount()

Returns:the number of rows in the table
Return type:int

New in version NX10.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature RowCount(rowCount)

Parameters:rowCount (int) – the number of columns in the table

New in version NX10.0.0.

License requirements: None.

Method Detail

GetString

TableEditorDefaultDataProvider.GetString

Gets the string data at a particular location in the table

Signature GetString(row, column)

Parameters:
  • row (int) – the rows to query
  • column (int) – the column to query
Returns:

the string data at the row and column specified

Return type:

str

New in version NX10.0.0.

License requirements: None.

SetString

TableEditorDefaultDataProvider.SetString

Overloaded method SetString

  • SetString(rows, column, stringData)
  • SetString(rows, column, stringData)

-------------------------------------

Sets string data at a particular location in the table.

Signature SetString(rows, column, stringData)

Parameters:
  • rows (int) – the row to set
  • column (int) – the column to set
  • stringData (str) – the string data to set
Returns:

whether or not the data was successfully set.

Return type:

bool

New in version NX10.0.0.

License requirements: None.

-------------------------------------

Sets string data on a range of table cells in a specified column. Returns whether any data was successfully set.

Signature SetString(rows, column, stringData)

Parameters:
  • rows (list of int) – the rows to set
  • column (int) – the column to be set
  • stringData (str) – the string data to set
Returns:

whether or not the data was successfully set.

Return type:

bool

New in version NX10.0.0.

License requirements: None.

-------------------------------------

Validate

TableEditorDefaultDataProvider.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.