---
title: "layer.locate: Locate Object — Vector kit command — Kition"
description: "Highlights an object's row in the Layers panel and answers its ancestry of layers; the document is unchanged."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/layer.locate"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/layer.locate](https://developer.kition.ai/docs/kits/vector/commands/layer.locate)

# layer.locate

**Locate Object.** Highlights an object's row in the Layers panel and answers its ancestry of layers; the document is unchanged.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: no
- Acts on: `id` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | no | object ID |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "layer.locate" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `id`. vector_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ancestry` | `number[]` | no |  |
| `id` | `number` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "ancestry": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "id": {
      "type": "number"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    }
  },
  "returns": "{id, ancestry: [layer…, id]}",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
