LookUpTableBase
Last update: 16.07.2025class compolyx.LookUpTableBase(obj, parent=None)
Lookup table class.
Associates scalar or vector values to points.
Example:
>>> table = db.models['class40.1'].create_lookup_table1d(name='LookUpTable1D.1')
>>> table.columns['Location'].values = [0,1,2,3]
>>> db.models['class40.1'].lookup_tables['LookUpTable1D.2'].create_column( name='Radius', type='scalar' )
>>> r = db.models['class40.1'].lookup_tables['LookUpTable1D.2'].columns['Radius']
>>> r.values = [0,0.3,0.6,1]
Attributes
| Name | Description |
|---|---|
LookUpTableBase.active |
LookUpTable active |
LookUpTableBase.column_factory |
|
LookUpTableBase.column_types |
A list of column types ('scalar', or 'direction') |
LookUpTableBase.columns |
Dictionary with all columns |
LookUpTableBase.dimensions |
|
LookUpTableBase.empty |
True if table is empty |
LookUpTableBase.enabled |
Whether this object is currently enabled or not. |
LookUpTableBase.id |
ID of object |
LookUpTableBase.is_dict_item |
Specifies whether the object is an item of a dict |
LookUpTableBase.is_list_item |
Specifies whether the object is an item of a list |
LookUpTableBase.link_path |
Root path of the current node in the tree for links to this object |
LookUpTableBase.location_column_name |
|
LookUpTableBase.name |
Name of object |
LookUpTableBase.num_cols |
Number of rows |
LookUpTableBase.num_rows |
Number of columns |
LookUpTableBase.parent |
Parent object in tree |
LookUpTableBase.root_path |
Root path of the current node in the tree |
LookUpTableBase.status |
Status of the object |
LookUpTableBase.status_changed |
Boolean flag which is set to true in C++ when up-to-date status of object changes |
LookUpTableBase.tabular_data |
a tuple containing a list of column labels and a 2d array with floats for all cells |
LookUpTableBase.uid |
UID of object |
LookUpTableBase.vector_column_suffix |
|
LookUpTableBase.vertex |
Throws an error if the object has been removed from the graph |
Methods
| Name | Description |
|---|---|
LookUpTableBase.clear() |
Clear table data (rows and columns) |
LookUpTableBase.clear_rows() |
Clear table rows (keep columns) |
LookUpTableBase.create_column(name[, type, ...]) |
Create a new column |
LookUpTableBase.find_parent(type) |
Steps up the tree and returns the first parent with given type |
LookUpTableBase.load_from_csv_file(path) |
Load the table from .csv file in path |
LookUpTableBase.obj_exists() |
Checks if __obj still references the C++ object (i.e. has not been reset to None by self._delete) and exists in the graph |
LookUpTableBase.save_to_csv_file(path) |
Save LookUpTable to CSV file |
LookUpTableBase.serialize_name_and_id() |
Helper function to serialize name and ID |
LookUpTableBase.update() |
|
LookUpTableBase.visit(visitor) |
Walk through the tree and let the visitor perform action on every descendant node |