Skip to main content
Version: 2026R1

DB

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

Class to represent the ComPoLyX database.

Access:

>>> import compolyx
>>> db = compolyx.DB()

Attributes

NameDescription
DB.active_modelActive model
DB.is_dict_itemSpecifies whether the object is an item of a dict
DB.is_list_itemSpecifies whether the object is an item of a list
DB.link_pathRoot path of the current node in the tree for links to this object
DB.material_dataMaterial database
DB.modelsModels
DB.nameName of object
DB.parentParent object in tree
DB.root_pathRoot path of the current node in the tree

Methods

NameDescription
DB.clear()Clear database
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([model])Close model
DB.find_parent(type)Function steps up the tree and returns the first parent with given type
DB.import_model(name, path, format[, ...])Create a model from file
DB.open(path[, replace_workbench_inputs, ...])Open ACP file and append the model to models container
DB.open_h5(path[, cache_data, ...])Load a model from an .acph5 database
DB.refresh_acph5(path, external_sources[, ...])Refresh an .acph5 database (Workbench application mode only)
DB.reload(model)Reloads the reference surface (mesh) of the model
DB.run_script(path[, locals])
DB.save([path, model, cache_data])Save active model
DB.set_unit_system(unit_system_type)Set the unit system of all models opened in the database
DB.visit(visitor)Walk through the tree and let the visitor perform an action on every descendant node