> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DB

### *class* compolyx.DB(\*args, \*\*kwargs)

Represents the compolyx database

Access:

```python theme={null}
>>> import compolyx
>>> db = compolyx.DB()
```

### Attributes

| Name | Description |
| - | - |
| [`DB.active_model`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.active_model) | Active model. |
| [`DB.is_dict_item`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.is_dict_item) | Indicates whether the object is an item in a dictionary. |
| [`DB.is_list_item`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.is_list_item) | Indicates whether the object is an item of a list. |
| [`DB.link_path`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.link_path) | Root path of the current node in the tree for links to this object. |
| [`DB.material_data`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.material_data) | Material database. |
| [`DB.models`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.models) | Models. |
| [`DB.name`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.name) | Name of the object. |
| [`DB.parent`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.parent) | Parent object in the tree. |
| [`DB.root_path`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.root_path) | Root path of the current node in the tree. |

### Methods

| Name | Description |
| - | - |
| [`DB.clear`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.clear)() | Clears the database. |
| [`DB.clear_generated_data`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.clear_generated_data)(\[model]) | Function clears the eventually stored update results and deletes the generated data such as Production and analysis plies, solid models, etc. |
| [`DB.close`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.close)(\[model]) | Closes the model. |
| [`DB.find_parent`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.find_parent)(type) | Steps up the tree and returns the first parent with given type. |
| [`DB.import_model`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.import_model)(name, path, format\[, ...]) | Create a model from file. |
| [`DB.open`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.open)(path, \*\[, pre\_db, unit\_system\_type, ...]) | Open an ACPH5 file. |
| [`DB.open_h5`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.open_h5)(path\[, cache\_data, ...]) | Load a model from an .acph5 database. |
| [`DB.refresh_acph5`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.refresh_acph5)(path, external\_sources\[, ...]) | Refresh an .acph5 database (Workbench application mode only). |
| [`DB.reload`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.reload)(model) | Reloads the reference surface (mesh) of the model. |
| [`DB.run_script`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.run_script)(path\[, locals]) | |
| [`DB.save`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.save)(\[path, model, cache\_data]) | Save active model. |
| [`DB.set_unit_system`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.set_unit_system)(unit\_system\_type) | Set the unit system of all models opened in the database. |
| [`DB.visit`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/_autosummary/compolyx.DB.visit)(visitor) | Walk through the tree and let the visitor perform action on every descendant node. |
