# 14. Preferences and saving your work

## Preferences

Choose **Edit > Preferences** (**Cmd+,**). One window holds the settings you pick once and expect to stay:

| Setting | Choices |
|---|---|
| Language | Follow system (the default on a new install: the system's preferred language at each start), English or 繁體中文 |
| Theme | macOS (follow system, on a Mac only), Follow System, Light Modern, Light+, Dark Modern, Dark+, Dark High Contrast or Light High Contrast |
| Schematic colours | Classic (textbook colours) or Ink (all ink, blue control signals) |
| Grid spacing | 1, 2, 5 or 10 units. Parts and wire corners snap to it (also **View › Grid Spacing**) |
| Wires follow moved parts | On (the default): a part you drag keeps its wires. Off: a dragged part lets go of the wires to parts that stay behind, and **Alt+Shift** (Option+Shift) held during the drag keeps them that once (chapter 3) |
| Minimap | Shows or hides the minimap on the schematic (chapter 3) |
| Minimap on large circuits | Shows the minimap by itself on a level with more than 60 parts (on by default) |
| Interface scale | Makes all text and controls larger or smaller, for a projector or a sharp screen |
| Show launch screen | On (the default) or off: the launch screen while the app starts (chapter 2) |
| Show the Start page when no circuit is open | On (the default) or off: the Start page, or an empty canvas that names **File > New Circuit** (chapter 2) |
| Reduce motion | Off (the default) or on: nothing in the app animates. The launch screen, the Start page, spinners, check boxes and collapsing sections hold still or change at once. The system's own Reduce motion setting does the same |
| Use window translucency | On a Mac only. On (the default) or off: the macOS theme lets the desktop show through the side bars, the toolbar and the panels |
| Autosave | On or off, and the interval in seconds |
| After each run | Keep in the dock, Whole scope in one window (the default: a run opens the scope's own window, as PSIM opens SIMVIEW) or Each plot in its own window (a run opens each plot in a window, tiled on the screen) (chapter 5) |
| Echo menu actions in the console | On or off: a click in a menu also shows the command it runs in the console (chapter 13) |
| Check for updates once a day | On or off (chapter 1). Voltecx never installs an update by itself; **Download page** opens the website's download page. The update window has the same switch, and **Help > About Voltecx** says when a newer version is out, with **See what's new** |

There is no Apply button. A change takes effect in the next frame, and Voltecx remembers it for the next start. Most of these settings are also in the **View** menu. Press **Esc** to close the window.

![The Preferences window, marked 1 to 4](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/preferences/01-prefs.png)

1. Language.
2. Theme.
3. Autosave.
4. After each run.

A line names the settings folder, where Voltecx keeps the session and the recovery copies.

The **Assistant** section sets up the agent panel (chapter 12): the API key (pasted once, kept in the system's credential store, shown only as `sk-ant-…` and its last four characters, with Save, Remove and Test), where the key in use comes from (the credential store or `ANTHROPIC_API_KEY`, which wins when set), the model, **Ask Assistant sends questions to** (the built-in panel, or Claude Code in the Terminal; chapter 12), and **Save assistant chat in circuit files** (on by default). The key is never part of the settings file. The model and the chat setting are saved with the other settings.

The **Privacy** section holds one switch, **Send anonymous usage statistics and crash reports**. It is off unless you agree. While it is off nothing is recorded, saved or sent. **Show what is sent** lists every event that is waiting to be sent, and **Delete queued events** throws them away. A version of Voltecx that collects no statistics says so here instead. The first-run screen asks the same question (chapter 1).

![The end of Preferences, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/preferences/02-privacy.png)

1. The update check: **Check for updates once a day**, or, in a version that never checks (as here), a line that says so.
2. The Privacy switch.
3. The list of what is waiting to be sent, empty here.

**Input and shortcuts** lists every key binding, grouped as in **Help › Keyboard Shortcuts**. Point at a row and click **Change**, then press the new keys (Esc cancels); **Reset** puts a changed key back, and **Show changed (N)** keeps only the keys you changed. Keys another command already has are refused under the row, which names that command and its menu. Your key bindings (chapter 3) are saved with the same settings. On a Mac, a key that macOS keeps for itself (Cmd+H hides the app, Cmd+M minimises the window, Cmd+Tab switches apps) cannot be bound, and **Input and shortcuts** warns about any of your bindings that use one, with **Show keys** to change them. **Editor** ends with a link to the scroll wheel setting, which lives under **Input and shortcuts**.

The **Account and licence** section has **Compare plans**, which opens the website's plans, while the free trial runs or no licence is installed. The **Assistant** panel, before a key or a sign-in is set up, says what the assistant can do (explain a waveform, fix what Problems reports, tune a value to a target, design a converter from a sentence) above its setup card.

The colour themes are VS Code's default themes. **Follow System** draws Light Modern or Dark Modern as your operating system is set, and switches when the system does. On a Mac, **Follow macOS** is the theme a new install starts with (an existing settings file keeps the theme it holds). It draws the Mac's own light or dark greys as the system is set and switches with it, colours buttons, selections and focus rings with your accent colour (System Settings › Appearance; Voltecx makes it darker or lighter where text on it would be hard to read), and draws interface text in the system font, San Francisco, read from the system and not shipped with Voltecx (Chinese text keeps the bundled font). The window's content runs under the title bar: the window buttons sit at the left of the toolbar, a drag on an empty part of the toolbar moves the window, and a double click there zooms it. While **Use window translucency** is on, a window material (Liquid Glass on macOS 26 and later, the sidebar and title-bar materials before) shows through the toolbar, the activity bar, the side bars and the panels; the schematic, the plots and the text fields stay opaque. The translucency is light on purpose: every text colour keeps at least 4.5:1 contrast whatever the wallpaper behind the window. **Reduce transparency** (System Settings › Accessibility › Display) turns it off, and **Increase contrast** draws the theme as Dark or Light High Contrast. A change to the accent colour or to these settings shows within a second of the next thing you do in the window.

You can also pick a theme the way VS Code does: open Quick Open (**Cmd+K**), run **View › Appearance › Color Theme**, and move through the list with the arrow keys. Each theme is shown as you reach it. **Enter** (or a click) keeps it, and **Esc** puts back the theme you had. The high-contrast themes also draw the schematic in stronger colours.

## Autosave and recovery

Voltecx copies a circuit with unsaved changes to a recovery folder a few seconds after each edit. The default interval is 5 seconds, and you can change it in Preferences, from 1 second to 1 hour. Switch autosave off with the checkbox. The autosave does not replace your file. It is a separate copy.

- Saving the circuit, or undoing back to the saved state, removes its recovery copy.
- Closing a circuit with unsaved changes (**File > Close**, Cmd+W), quitting (**File > Quit**, Cmd+Q) or closing the window asks **Save changes to "name" before closing?** for each such circuit. **Save** saves it (Save As for a circuit that has no file yet). **Don't Save** closes it and deletes its recovery copy. **Cancel** keeps everything open and stops the quit.
- If the app ends without asking (a crash, or an agent's `app.quit`), the copies stay in place on purpose.
- At the next start, Voltecx says it found circuits with changes that were not saved, and asks **Restore unsaved work?** **Restore** opens the copies. **Discard** deletes them.
- Without any recovery copy, Voltecx reopens the tabs of your last session from their files. It remembers the open tabs, the active one, each tab's zoom and position, the panel layout, the theme, the language, your key bindings and the recent files.

The settings, the session and the recovery copies are in one folder: `~/Library/Application Support/PowerCraft` on a Mac, `%APPDATA%\PowerCraft` on Windows, and `~/.config/powercraft` (or `$XDG_CONFIG_HOME/powercraft`) on Linux. The Mac and Windows folders keep the product's old name so that existing settings, sessions and saved keys are found after the rename to Voltecx (the keychain entry also keeps it). Start the app with `--config-dir DIR` (or set `POWERCRAFT_CONFIG_DIR`) to use another folder, and with `--no-session` to start without restoring the last session.

The window title and the menu bar show the active circuit's name and its file, with a dot (•) in front while it has unsaved changes.

## Several windows

Each Voltecx window is a separate copy of the program, so you can put two circuits side by side or on two monitors.

- **File > New Window** (Cmd+Shift+N) opens an empty window.
- **File > Open in New Window** asks for a circuit file and opens it in a new window.
- **File > Move to New Window** closes the active circuit here and opens its file in a new window. Save the circuit first: the new window gets only what is in the file.
- **View > Detach Scope** shows the scope in a window of its own, as SIMVIEW sits beside the schematic in PSIM. The schematic window keeps the canvas. Close the scope window, click **Dock Back**, or choose the item again, to put the scope back below the canvas. While the scope window has focus, the scope's keys and F5 act in it; the other shortcuts act in the schematic window. The scope window opens where you left it (chapter 5).
- **View > Enter Full Screen** (Control+Cmd+F on a Mac, F11 elsewhere) fills the screen with the window, and the same key leaves full screen. The key also works in a detached scope window, for that window. On a Mac it is macOS’s own full screen, the same as the green window button and Fn+F. Voltecx does not remember full screen for the next start.

The windows share the settings folder, but each keeps its own session and recovery copies, so they never overwrite each other. The first window reopens the tabs of your last session. A window opened next starts with the first window's preferences and recent files, and with no circuits. If a window closed with unsaved changes, or crashed, the next window you open offers its recovery copies.

A circuit file can be open in only one window at a time. Opening it, or saving over it with Save As, in a second window says **is already open in another Voltecx window**. Use the window that has it open, or close it there first. A window started with `--no-session` does not take part in this check.

## The last result comes back

After a restart, you do not have to run the simulation again to see the scope. The desktop app keeps the last result of the active circuit in a `results` folder beside the session file, and brings it back when you open the same circuit again.

The result is stored under a fingerprint of the circuit text. It comes back only for a circuit that is exactly the same. If you changed even one value, Voltecx starts clean and never shows a stale result. The folder is limited to 20 MB, and the oldest results go first. A result with values that are not numbers is not kept.

## Preview features

A feature that has not passed its release checks yet ships as Preview. Today that is the field solver (its commands are `magnetics.fieldSolve`, `magnetics.fieldCoreLoss`, `geometry.*` and `field.*`; they arrive in later versions). **Edit > Preferences > Preview features (field solver)** allows them. It is off in release builds and on in development builds. While it is off, those commands are refused with a message saying where to turn it on, and their items in **Design › Field Solver** stay in the menu, greyed out, with the same hint when you hover them. A Preview result says so: its reply carries `preview: true` and a note in English and Traditional Chinese for reports and exports to show. The CLI and scripts use `preview.set {"enabled":true}`.

## Keep the simulation in step with the board

**Edit > Preferences > Simulation > Keep the simulation in step with the board** is off by default. With it on, Voltecx waits until a board edit has settled (one second with no further edit, so a drag or a run of quick edits counts once) and then runs `layout.syncBoard` on the open project's board. Undo and redo on the board count as edits. The command reads each power loop's inductance and each switching node's capacitance from the board again and compares them with the stray parts in the circuit (`Lpcb1`, `Cpcb_sw_gnd`, ...). Only the parts that moved, and new ones, are written, as one undo step, and the simulation runs again. When nothing moved, nothing is written or run, and the status line says the simulation is in step with the board. When something moved, the **Board Sync** window lists each stray part with its value before and after and how much it changed. A stray part that the board no longer gives is kept and named there, so you can delete it if the loop is really gone. The sync waits while a simulation or another job runs, and starts after it.

## Memory

A run can be large: one result of a 0.3 second FOC drive took about 120 MiB when it was measured. The desktop app keeps the waveforms of the newest earlier runs in memory and parks older ones in a folder of its own. **Edit > Preferences > Earlier runs kept in memory** sets how many stay (0 to 9, 3 by default, within 64 MB). Comparing or overlaying a parked run reads it back. A run you tagged stays in memory. Sweeps, Monte Carlo, optimise, sensitivity, worst case and tune to spec record only the signals they measure.

Before a simulation starts, Voltecx estimates the memory its recording needs. When that is more than 60 percent of the free memory, the run is refused and the message lists what to change (the print step, **Save from**, fewer probes). **Run Anyway** starts it regardless. Between 30 and 60 percent the run starts with a warning. While a run goes, a watchdog stops it, as Cancel does and keeping the samples so far, when the memory held reaches 80 percent of the RAM or less than 2 percent is free. The solvers compute in 64-bit numbers, but a recorded waveform stores its values as 32-bit numbers (4 bytes a sample) on a 64-bit time axis.

## In the browser

The browser version has no files of its own (see "Files in the browser" below), so it saves unsaved circuits into the browser's own storage (`localStorage`) instead. The idea is the same: after the autosave interval, every circuit with changes is copied. Each browser tab keeps its own recovery entry, so two tabs never overwrite each other, and the app also saves when the page is hidden or closed. When you open the page again, it offers the same **Restore** and **Discard** choice for the tabs that are gone (closed, or not seen for 10 minutes), never for a tab that is still open.

Browsers can refuse storage when the quota is full or the site data is blocked. Voltecx then says so once on the status line and tries again at the next interval. A circuit larger than 4 MB is not saved, and the status line says so. The browser version does not remember your tabs or the last result. Use **File > Save** for anything you want to keep.

## Saving as a bundle

Besides the plain `.voltecx` text file, a circuit can be saved as a bundle: one file that also holds the last simulation result and a small picture of the schematic. When you open the bundle, the scope shows the saved result without a new run, but only if the circuit has not changed since. The command `file.save` (or `file.saveAs`) with `"bundle": true` writes a bundle, and a file keeps the form it was opened in. Plain text stays the default, and autosave always writes plain text. The command-line tool reads both forms (`powercraft-cli info` says whether a file is a bundle).

## Versions and history

Every time you save a circuit to a file, Voltecx keeps a version of it. You do not need to know git: open **File > Versions** (or the branch icon on the activity bar) to see every version as one line, newest first, like Runs (chapter 5).

![File › History, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/history/01-history.png)

1. Keep the circuit as a variant.
2. A version an agent changed: its line says `AI` after the version number, and its tooltip gives the agent's note.
3. Restore an earlier version. A line shows its buttons while the pointer is on it.

- **What a line shows.** A title (the version's name, its note, or the first change), then the version number and how long ago. Its tooltip adds a small picture of the schematic, who saved it and who changed the circuit since the version before. Click the line to see every change: part, parameter, before and after.
- **A note and a name.** `file.save {"note": "..."}` gives a version a note. **Add name** marks a version you want to keep, such as "sent to client": a named version is never dropped. Voltecx keeps the latest 200 unnamed versions and 100 named ones.
- **Compare.** Click **Compare** on one line to compare that version with the circuit now, or on two lines to compare them. The comparison is the same as `file.diff`: parts added, removed and renamed, parameters with units, wiring per net, variables and simulation settings. Changed parts are outlined in orange on the schematic, added parts in green, and rewired nets are drawn in blue.

![Comparing a version with the circuit now, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/history/02-compare.png)

1. **Compare** on the version.
2. The legend under the schematic: what the marks mean.
3. The changed part outlined on the schematic.

- **Restore.** **Restore** puts the circuit back as that version was. It is one step: **Edit > Undo** brings back the circuit you had before.
- **Variants.** Type a name and click **Save as Variant** (or choose **File > Save as Variant**) to keep the circuit as it is now beside the others, for example an A design and a B design in one file. **Compare** works on variants the same way, and **Switch to** makes the circuit that variant (one undo step).
- **Where they live.** The versions and variants are kept next to the file, in `<name>.voltecx-history`. Copy or send the two files together to keep the history. A password-protected file keeps its versions only while it is open; they are never written next to it unencrypted. In the web app the versions stay in the browser tab while it is open; a save downloads only the circuit.

Agents and scripts use `history.list`, `history.name {id, name}`, `history.restore {id}` or `{variant}`, `history.saveVariant {name, note}`, `history.removeVariant {name}`, `history.thumbnail {id}`, and `file.diff` with `{"version": "v2"}` or `{"variant": "B"}` sides.

### Who changed what

Each version and each run records who made the change: a person at the desktop app, a CLI script, or the AI assistant. A change the assistant made carries an **AI** badge and the assistant's note: one short line on what it changed and why. Compare that version with the one before, or restore the one before, to review or undo what the AI did. The line **Not saved yet** at the top lists who changed the circuit since the last save.

The words you typed to the agent are never kept: they belong to your AI session and may hold private text. Only the note the agent sends is kept, and by default only its first line, cut to 140 characters. **Edit > Preferences > Assistant > Keep AI requests in history** keeps the whole note, as the agent sent it. Only you can change this setting; automation cannot.

### Circuits in git

Teams that keep circuits in git can let git show and merge `.voltecx` files the way Voltecx does. Put this line in the repository's `.gitattributes`:

```text
*.voltecx diff=voltecx merge=voltecx
```

Then tell git which commands to use (once per clone, or with `--global`):

```text
git config diff.voltecx.command "powercraft-cli diff"
git config merge.voltecx.name "Voltecx circuit merge"
git config merge.voltecx.driver "powercraft-cli merge %O %A %B"
git config difftool.voltecx.cmd 'powercraft-cli diff "$LOCAL" "$REMOTE"'
git config mergetool.voltecx.cmd 'powercraft-cli merge "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"'
git config mergetool.voltecx.trustExitCode true
```

- `git diff` and `git log -p` now print what changed in the circuit instead of JSON lines, for example `R1.r: 1 kΩ → 2.2 kΩ`. `powercraft-cli diff OLD NEW` does the same for any two files, and `--lang zh-Hant` prints it in Traditional Chinese.
- `git merge` merges two branches that changed the same circuit, part by part and value by value. When both branches changed the same value, git stops with a conflict; the file keeps your branch's value and stays a valid circuit, and the conflicts are listed in the terminal. Open it in Voltecx, check those values, and commit. `powercraft-cli merge BASE OURS THEIRS -o OUT` does the same by hand.
- Add `*.voltecx-history` to `.gitignore`: git already keeps the history.
- `diff` and `merge` need the Voltecx Terms accepted, as the other commands do (see chapter 1). A merge writes the plain form, without a bundle's result and runs.

## Review comments

A reviewer leaves notes on the circuit itself, as in Figma, and the notes are saved in the file. Pick the **Comment** tool (the speech bubble in the tool dock, **Edit > Draw Tools > Comment Tool**, or **Shift+C** with the pointer over the schematic; **C** still places a capacitor), then click the schematic to drop a pin, or drag to pin an area. A box opens next to the pin: type the comment and press **Enter** (**Shift+Enter** starts a new line).

![A comment thread open on its pin, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/comments/01-popover.png)

1. The pin. Its number is the thread's row in the **Comments** view.
2. **Resolve** (the check mark). On a resolved thread it reads **Reopen**.
3. **Delete Thread** (the bin). Like every comment change, **Edit > Undo** brings it back.

Click a pin to open its thread there: each message with its author and how long ago (point at the time for the full date), and a reply box. **Esc** or a click elsewhere on the schematic closes it. Point at a pin without clicking to read the first message and the number of replies.

![Pointing at a pin, marked 1 to 2](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/comments/02-card.png)

1. The pin under the pointer.
2. The number of replies.

The **Comments** view of the side bar lists the same threads, numbered as their pins. A pinned area is named by the part or the net under it, or **Canvas**. Choosing a thread there opens the same box on the schematic and moves the view to its pin. With a part or a net selected, **Add Comment** in the view pins the comment to it; on the scope, it pins one to cursor 1. Each message shows its author and the date and time it was written, in UTC (`2026-10-21 09:15 UTC`); point at it for how long ago. While the view shows, the status bar counts the threads: **Comments · 2 open, 1 resolved**. Scripts and agents use `comment.add`, `comment.reply`, `comment.resolve`, `comment.reopen`, `comment.delete`, `comment.list` and `comment.merge`, the same commands the pins run.

## Packing a circuit to share

Zipping a project folder by hand loses things: a plug-in block's module, a device you added to your own library. **File > Pack for Sharing** writes one file that carries the circuit and everything it needs to open and simulate on another computer.

![The Pack for Sharing window, marked 1 to 4](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/img/en/pack/01-pack.png)

1. **Files packed with the circuit** lists each outside file the circuit uses, with its size: the wasm plug-in modules of its plug-in blocks and the devices from your own library that its switches name. These files leave your computer, so the list comes first and nothing is written yet.
2. **Already inside the circuit** lists what a `.voltecx` file always carries: C code with the include files it was imported with, embedded devices, subsystems, symbols and protected blocks. They are not packed twice.
3. **What goes in**: only the listed files go in (its tooltip says so too). Voltecx never reads the rest of the circuit's folder, so licence files, keys and other files never leave with it. A file that looks like a key is refused even when a part refers to it.
4. **Pack** asks where to write the copy (`NAME-packed.voltecx`). Your circuit's own file does not change.

A reference that cannot be found is listed under **Missing** in red, with the parts that use it: a plug-in that is not loaded, a device that is in no library, or a C `#include` of a file that the circuit does not hold. Load it first (**Load Plug-in**; for a device, **Add to My Library…** reads a device file, Voltecx device JSON or a device table CSV, as that device and keeps it inside the circuit, or **Pick Another Device** selects the part so Properties can name another), or tick **Pack without the missing files**; the receiver then cannot simulate those parts. The packed files may come to at most 128 MB; a larger pack is refused with the sizes.

When someone opens the packed file, Voltecx copies its files into a folder beside it (`NAME-packed.voltecx-files`) and loads the plug-ins and devices, so the circuit simulates to the same result even on a computer that has none of them. Each file is checked against the SHA-256 in the file's manifest first; a damaged one is left out with a warning. A version of Voltecx from before packing refuses a packed file and asks you to update, instead of opening a circuit that cannot simulate.

**Share as** picks how the pack leaves: **A file** writes it as above; **A link** (Voltecx Cloud, signed in) saves it as a new project in your team workspace, named after the circuit with "(packed)", and copies the project's link. Only the workspace's members can open it; they open it from the Cloud Projects view, and its plug-ins and devices load from the pack without anything being written to their computer. A viewer cannot save to a workspace, so the window says so and keeps **Pack** greyed until a workspace you may save to is picked.

Agents and scripts use `file.packCheck {}` for the list and `file.pack {path, allowMissing?, maxBytes?}` to write the file.

## Protecting a file with a password

**File > Protection > Save Protected** saves the circuit encrypted with a password. Type the password twice; a short hint says whether it looks weak, fair or strong (a rough guide only). The circuit must already have a file: save it once with **File > Save As**, then protect it. A protected file is still a `.voltecx` file, and plain text stays the default for everything else.

- Opening a protected file asks for its password. A wrong password says only **The password is not correct.** and you can try again. A file that was damaged or changed says so instead.
- While the circuit is open, **File > Save** keeps it protected without asking again. Voltecx keeps a key made from the password in memory until you close the circuit, never the password itself.
- A lock (🔒) before the name, on the tab and in the window title, shows that the file is protected.
- **File > Protection > Remove Protection** saves it as an ordinary file again.
- Agents and scripts use `file.saveProtected {password}`, `file.open {path, password}`, `file.removeProtection` and `file.isProtected {path}`.

What protection does not do:

- **A forgotten password cannot be recovered.** It is not stored anywhere, and there is no back door.
- A protected circuit is plain in memory while it is open. No recovery copy and no saved result are written for it, so if the app crashes, its unsaved changes are lost. Save often.
- The browser version opens protected files but cannot save them.

The key is made from the password with Argon2id (64 MiB, 3 passes) and the file is encrypted with XChaCha20-Poly1305. The details are in `docs/formats/pcraft.md`.

## Protected sub-circuit blocks

A protected block is a subsystem you can give to someone else to simulate without showing them what is inside: a gate-drive stage, a controller, a power stage.

1. Build the block as an ordinary subsystem (**Circuit > Subsystem > Create Subsystem**) and check that it simulates.
2. **Circuit > Protected Blocks > Protect Subsystem** asks for the definition's `name`, an optional `password` and `allowParams`: circuit variables the inside uses that each user may change (for example an output inductance `Lf`). Their current values become the defaults.
3. The instances keep simulating exactly as before, but the inside can no longer be opened, edited, probed or exported. **Edit > Undo** gives you the open subsystem back; keep an unprotected copy of your file.
4. **Circuit > Protected Blocks > Export Protected Block** writes a `.pcblock` file. The receiver adds it with **Circuit > Protected Blocks > Import Protected Block** (give `instance` to place one), wires its pins and sets its public parameters with **Circuit > Parameters** on the instance. Copying an instance to another circuit brings the block along.

Without a password any copy of Voltecx simulates the block. With one, the receiver runs **Circuit > Protected Blocks > Unlock Protected Block** with the password before simulating; a wrong password says only **The password is not correct.**

What the receiver sees: the block's pins, its public parameters and their values, its own signals at the pins, and its losses as one total under the instance's name. What they never see: the parts inside, their values or names, signals inside, and the inside in an error. An error inside reads ``protected block `P1`: a part inside reported a problem; its details are hidden``. A netlist, KiCad or code-generation export of a circuit that places a block is refused.

**The honest limit.** Voltecx has to decrypt the block in memory to simulate it, so the key reaches the receiver's machine. This deters casual viewing and copying, not a determined attacker with a debugger. Expressions that the simulation evaluates while it runs (behavioural sources over time) see the receiver's circuit variables, not the block's own.

Agents and scripts use `subsystem.protect {name, password?, allowParams?}`, `subsystem.unlockProtected {name, password}`, `subsystem.exportProtected {name, path}`, `subsystem.importProtected {path, name?, instance?}` and `subsystem.listProtected`.

## Signed files

Every save is signed with a key that belongs to this installation of Voltecx. It is made the first time the app starts and kept in the settings folder, readable only by you. When a licence is installed, the signature also names the licence (by a short id, not your name or email address).

The status bar shows the signature of the active circuit's file:

- **✔ Signed**: the file is unchanged since it was signed.
- **⚠ Modified after signing**: the file was changed after it was signed (by hand, by another program, or on the way).
- **Unsigned**: an older file, or one saved with signing off.

Click it (or use **File > Protection > Verify Signature**) to see which key signed the file, the licence and the time. If a colleague sends you a file, you can **Trust This Signer** under a name, and their files then read as signed by that name. The same window turns signing off (**Sign files when saving**). Protected files are signed before they are encrypted, so their signature is checked after you type the password.

What a signature means, honestly: it shows that a file is unchanged since the holder of that key saved it. Anyone can change a file and sign it again with a key of their own, so **Signed** does not mean "made by Voltecx", and it names a person only if you trust their key. The key file is protected by your account's file permissions only, and the time comes from the signer's own clock.

## Files in the browser

The browser has no folders that the app can read, so the File menu works through the browser instead.

- **File > Open** and **File > Import** show the browser's file chooser. You can also drop a file on the page. A `.voltecx` file, a PSIM `.psimsch` file, an LTspice `.asc` file, a PLECS `.plecs` file and a SPICE netlist (`.cir`, `.net`, `.sp`, `.spi`, `.spice`, `.ckt`) are recognised by their extension. A file with another extension is recognised by its content. Files over 64 MB are refused. Included files of a netlist cannot be read, and a warning says so.
- **File > Save** and **File > Save As** download the circuit as `NAME.voltecx`. A circuit that you opened keeps the name of its file, so Save downloads it under the same name. The browser decides the folder, and some browsers ask each time.
- **File > Export > Waveforms (CSV)** downloads `NAME-waveforms.csv`. **File > Export > SPICE Netlist** downloads `NAME.cir`. **File > Export > LTspice or PLECS File** downloads the circuit written back into the file it was imported from, as `NAME.asc` or `NAME.plecs`.
- **Scope > Export** opens its parameter window with the format set to `png`, so the scope picture downloads as a PNG. Change `format` to `csv` for the data.
- **File > Print** downloads the schematic as `NAME.svg`, black on white. Open it and print it from the browser, or save it as a PDF there.
- Shortcuts with Ctrl or Cmd, and F1 to F12, go to Voltecx, not to the browser: F5 runs the simulation and Ctrl+R rotates instead of reloading the page. Cut, copy and paste work as usual. A browser keeps Ctrl+W, Ctrl+N and Ctrl+T for itself, so in the browser use the File menu to close a circuit or start a new one.
