---
title: "calculator.open: QuickCalc — CAD kit command — Kition"
description: "Evaluates an arithmetic expression, with optional named variables, as QuickCalc does, and answers the result."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/calculator.open"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/cad/commands/calculator.open](https://developer.kition.ai/docs/kits/cad/commands/calculator.open)

# calculator.open

**QuickCalc.** Evaluates an arithmetic expression, with optional named variables, as QuickCalc does, and answers the result.

- Kit: CAD 0.1.0 (.dxf); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `expr` | `string` | no | like (3+4)*2^2 |
| `vars` | `object` | no |  |

## Call through cad_run

```text
cad_run {
  "path": "<file>.dxf",
  "steps": [{ "command": "calculator.open" }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | no |  |
| `value` | `number` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "message": {
      "type": "string"
    },
    "value": {
      "type": "number"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "expr": {
      "description": "like (3+4)*2^2",
      "type": "string"
    },
    "vars": {
      "additionalProperties": true,
      "properties": {
        "x": {
          "default": 1,
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
