---
title: "frame.thread: Thread Text Frames — Layout kit command — Kition"
description: "Threads a text frame's story into another frame (or a new frame drawn on a spread)."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/frame.thread"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/layout/commands/frame.thread](https://developer.kition.ai/docs/kits/layout/commands/frame.thread)

# frame.thread

**Thread Text Frames.** Threads a text frame's story into another frame (or a new frame drawn on a spread).

- Kit: Layout 0.1.0 (.klayout); reference: [Layout kit commands](https://developer.kition.ai/docs/kits/layout.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `at` | `integer` | no | read by the command beside its listed parameters |
| `autoflow` | `boolean` | no | Shift-click: then add pages with frames on their margins, threaded, until the story fits |
| `from` | `integer` | no | an object id from file.inspect or object.list |
| `keepLoaded` | `boolean` | no | load the text cursor again from the frame |
| `orientation` | `string` | no | read by the command beside its listed parameters |
| `page` | `integer` | no | 1-based: a new text frame on the page's margins |
| `position` | `string` | no | read by the command beside its listed parameters |
| `rect` | `number[]` | no | [x0, y0, x1, y1]; a new text frame there, spread coords |
| `side` | `"out" \| "in"` | no | default out: the frame follows `from`; in: it goes before `from` |
| `spread` | `integer \| object \| string` | no | the spread (default spread 0, for frame.thread the source frame's spread); one that names no spread is refused |
| `spreadGuide` | `boolean` | no | read by the command beside its listed parameters |
| `to` | `integer` | no | an object id from file.inspect or object.list |

## Call through layout_run

```text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "frame.thread" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `at`, `autoflow`, `from`, `keepLoaded`, `orientation`, `page`, `position`, `rect`, `side`, `spread`, `spreadGuide`, `to`. layout_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "at": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "autoflow": {
      "description": "Shift-click: then add pages with frames on their margins, threaded, until the story fits",
      "type": "boolean"
    },
    "from": {
      "description": "an object id from file.inspect or object.list",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    },
    "keepLoaded": {
      "description": "load the text cursor again from the frame",
      "type": "boolean"
    },
    "orientation": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "page": {
      "description": "1-based: a new text frame on the page's margins",
      "type": "integer"
    },
    "position": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "rect": {
      "description": "[x0, y0, x1, y1]; a new text frame there, spread coords",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "side": {
      "description": "default out: the frame follows `from`; in: it goes before `from`",
      "enum": [
        "out",
        "in"
      ],
      "type": "string"
    },
    "spread": {
      "description": "the spread (default spread 0, for frame.thread the source frame's spread); one that names no spread is refused",
      "oneOf": [
        {
          "description": "a spread counted from 0",
          "type": "integer"
        },
        {
          "additionalProperties": true,
          "description": "a spread reference {kind: doc|parent, index} (parent spreads counted from 0)",
          "type": "object"
        },
        {
          "description": "a parent spread's prefix or label, such as A or A-Parent",
          "type": "string"
        }
      ]
    },
    "spreadGuide": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "to": {
      "description": "an object id from file.inspect or object.list",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/layout-darwin-arm64@0.1.0 and the kit itself (layout_commands through @kition/cli@0.1.1, built from KitionAI/kition-layout@8767a18).
