project_update_part
Update a project part in place—MPN, base part, category, or manufacturer—while preserving its position and copied documents, then sync it to the correct layout subfolder.
Instructions
Change a part of the user project in place: its MPN, base part, category or manufacturer. The part keeps its place in datasheet-lens.toml and its copies (project_remove_part and project_add_part would delete and copy them again). Then project_sync moves a copy when the layout gives it a different subfolder. Gives the part and its documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mpn | Yes | The MPN of the project part now. | |
| base | No | The base part of the datasheet, for example TMP112D. Empty: no change. | |
| path | No | A folder of the user project (default: the working folder of the server). The project file datasheet-lens.toml is in it or in a parent folder. | |
| new_mpn | No | The new MPN, for example the concrete orderable MPN TMP112D0IDPWR in place of TMP112D0. Empty: no change. | |
| category | No | The function of the part. None: no change; an empty text removes it. | |
| manufacturer | No | The manufacturer, for example TI. Necessary only when two parts have the same MPN. | |
| new_manufacturer | No | The manufacturer, with the spelling of list_parts. Empty: no change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |