From b727487d80ee71fc46c5f1a8eeeacc703ebe5523 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 08:00:53 -0800 Subject: [PATCH] Docs: pathItems.removeAll() reports hidden or locked paths first pathItems.removeAll() throws "cannot delete hidden or locked paths" when any path is hidden or locked or is inside a hidden or locked object, and only otherwise "cannot delete objects on a locked artboard". Both messages end with a colon and up to 20 path ids. docs/mcp.md now says so in both places that describe removeAll(). --- docs/mcp.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index 17f142733a..32ed9d1a27 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3367,8 +3367,9 @@ through `$`: - `Document.pathItems` (https://ai-scripting.docsforadobe.dev/jsobjref/PathItems/) lists the document's paths in the order of `pageItems`, paths inside groups and compound paths included, with `length`, `[i]`, `[name]` (read as `pageItems["name"]` is read), `index(key)`, - `getByName(name)`, `removeAll()` (when any path is on a locked artboard, it throws - `cannot delete objects on a locked artboard` and deletes nothing), `add()` (a path with no points, from `path.create`, painted as new art; when new + `getByName(name)`, `removeAll()` (it deletes nothing and throws `cannot delete hidden or locked paths` when any path is + hidden or locked or is inside a hidden or locked object, and otherwise `cannot delete objects on a locked artboard` + when any path is on a locked artboard; each message is followed by a colon and the ids of up to 20 of those paths), `add()` (a path with no points, from `path.create`, painted as new art; when new art has no fill and no stroke, the path has neither), and the shape creators `rectangle(top, left, width, height, reversed?)`, `roundedRectangle(top, left, width, height, horizontalRadius = 15, verticalRadius = 20, reversed?)`, `ellipse(top = 100, left = 100, width = 50, height = 100, reversed?, inscribed?)`, @@ -3444,8 +3445,10 @@ through `$`: `changeStrokePattern` given as different values throw an error, and `changeFillGradients` false and `ellipse` with `inscribed` true throw an error that says they are not available yet. A change to the geometry or paint of a path that is hidden or locked, that is in a hidden or locked layer or group, or that is on a locked artboard throws - `Cannot edit` with nothing changed, and `pathItems.removeAll()` when any path is on a locked artboard throws - `cannot delete objects on a locked artboard` and deletes nothing. A path in a compound path or compound shape reads the fill, stroke and overprint of that compound path or + `Cannot edit` with nothing changed. `pathItems.removeAll()` deletes nothing and throws an error when any path is + hidden or locked or is inside a hidden or locked layer, group, compound path or other object (`cannot delete hidden or locked paths`), and otherwise + when any path is on a locked artboard (`cannot delete objects on a locked artboard`), each followed by a colon and + the ids of up to 20 of those paths. A path in a compound path or compound shape reads the fill, stroke and overprint of that compound path or shape, which the paint commands paint in its place. A change to a path's paint or stroke leaves the paint for new art, the active Fill or Stroke proxy and Recent Colors as they were. `transform`, `polarity` and the gradient stops are not available yet.