Import openLCA project
lca_import_projectImport an openLCA project: assess each variant and save one comparison. project is the project's name as engine_search(kind='project') lists it, or a unique part of it, in the database named by engine, else this connection's default, which must be writable. Each enabled variant's product system is imported into workspace as an s<N> (one already there is refreshed) and assessed once as an a<N> with the variant's amount, unit and allocation and the project's method and normalization/weighting set; the variants are saved as one comparison c<N>, returned as primary_ref. openLCA's API cannot calculate a project; this reproduces it variant by variant, each at its own amount (functional equivalence is not checked). Without confirm: true the call returns a preview and starts nothing. A run within 45 seconds returns its result; a longer one returns a task_id for lca_get_task_status. Refused: fewer than 2 or more than 8 enabled variants, or parameter redefinitions. Disabled variants are skipped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | Name of the engine database, as `lca_get(kind='engines')` lists it (case-insensitive). Omitted: this connection's default engine. | |
| confirm | No | Run the import: the systems, one assessment per variant and the comparison. Without it the call returns a preview of what would be imported and starts nothing. | |
| project | Yes | The openLCA project's name as `engine_search(kind='project')` lists it (backticks optional), or a unique part of it. | |
| workspace | Yes | Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work. |