# 匯出場圖 (`field.exportImage`)

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/commands/field-exportImage/)

**選單:** 無（快速開啟、CLI、Python 與 MCP） · **執行方式:** 立即完成

> 預覽功能：在「編輯 › 偏好設定 › 模擬」開啟預覽功能，或執行 `preview.set {"enabled":true}`。回覆會帶有 `preview: true` 與說明。

以下參數與說明取自指令本身的定義，與 CLI、Python 及 MCP 讀到的文字相同，因此保留英文。

## 說明

Preview. Renders a field result's map as the field view draws it (smooth colours in the sequential ramp, the legend with the quantity, unit and both ends, flux lines as contours of A\_z or isotherms, region outlines, a round scale bar and, on a thermal solve's temperature map, its hot spot), at print resolution in the design-token colours of the palette. Changes nothing.

## 參數

- `result`: object? (a reply of magnetics.fieldSolve {field:true}, field.openExample, magnetics.fieldCoreLoss {field:true} or field.thermalSolve {field:true}; default the latest such result of this session that has the quantity's map)
- `quantity`: "b|h|lossDensity|temperature"? (default the result's first: lossDensity for a core loss, b for a solve, temperature for a thermal solve)
- `circuit`: str? (b and h: the winding whose field at 1 A is drawn; default the first)
- `currents`: {circuit:A}? (b and h: draw the field of the windings at these currents instead, the 1 A fields superposed, windings not named at 0 A; not with circuit; each within ±1e6 A, not all zero)
- `at`: "peak"|s? (b and h, default b: draw the field at an instant of a magnetics.fieldCoreLoss {field: true} result's period: "peak" for the instant of the core's peak |B| (its peak.timeS and peakCurrents), or a time in s within the period, the currents linear between its samples; default the latest such result; not with circuit or currents)
- `from`: {circuit:A}? (b and h, with currents or at: draw the change of the field from these currents to those, B and H of each end subtracted element by element, windings not named at 0 A, each within ±1e6 A: the ripple of a corner is at "peak" from its mean currents)
- `range`: {"min":number,"max":number}? (the colour scale's ends in the map's unit, so several images share one scale; values outside take the end colours; default 0 to the core's 99th percentile of the element values by area, as the field window scales (the core: the regions with a loss, else with μr \> 1; the largest value without a core), and the coldest to the hottest node for a temperature)
- `format`: "png|svg"? (default the path's extension, else png)
- `widthPx`: int=2400 (256 to 4096)
- `heightPx`: int=1800 (256 to 4096)
- `dpi`: int=300 (72 to 1200: the PNG's resolution, and the SVG's size in mm)
- `palette`: "light|dark|print"="light" (the export palette: the light or dark canvas, or Print in black and white with a grey map; the app passes its theme for Follow the app theme)
- `lines`: bool=true (flux lines, or isotherms on a temperature map)
- `outlines`: bool=true (region outlines)
- `mesh`: bool=false
- `path`: str? (the .png or .svg file to write, through the host's file service)

## 回覆

- quantity
- unit
- legend
- range:{min,max}
- clipped (some value lies above range.max: the legend's top reads ≥)
- circuit
- currents? ({circuit:A} of every winding when currents or at were given)
- from? ({circuit:A} of every winding when from was given)
- solved (the b or h map is drawn from the result's field.solved, a solve on the core's B-H curve at exactly those currents (at either end of from): magnetics.fieldCoreLoss {field: true} on a B-H curve holds its peak instant's and its period mean currents', so at "peak" and at the mean currents a saturating core is drawn saturated, H from each element's secant μr; otherwise the 1 A linear fields superposed)
- at? ({timeS})
- largest:{value,element} (the map's largest element value and its element: at "peak" it is the core-loss reply's peak.b when the peak lies in the core)
- format
- widthPx
- heightPx
- dpi
- widthMm
- heightMm
- palette
- lines (segments drawn)
- scaleBarM
- hotSpot ({temperatureC,atMm,region} of a field.thermalSolve result, marked on its temperature map as a ring with its line on a plate; null otherwise)
- bytes
- path
- written
- svg? (svg without path)
- base64? (png without path)
- source:{command,kind}
- notes
- preview
- previewNote
