Repository navigation
search_and_replace
Bulk-edit properties across a whole project: sheet titles, element labels and information, conductor text, independent text. Despite the name, this isn't text find/replace β see Β§2 for what it actually does.
Source: sources/SearchAndReplace/ β searchandreplaceworker.{cpp,h} (the
logic), ui/searchandreplacewidget.cpp (the main scoping tree),
ui/replace*dialog.cpp (the per-category editors).
The main dialog is a tree of everything matched, grouped by kind:
- Sheets
- Text fields (independent text)
- Elements, further split into simple / master / slave / sheet-report / terminal β the same categories Linking elements documents
- Conductors
Right-click a sheet in the tree for Select the elements/conductors/texts of this sheet β jumps straight from a search result to a real selection on the canvas, useful for checking a match before you commit to changing it.
Each category opens a dialog with one field per property (label, comment, sheet title, conductor colourβ¦). Leave a field blank and that property is left completely untouched on everything matched. Fill one in, and it replaces the value outright β not a substring swap, the whole field becomes what you typed.
That distinction matters: there is no "find X, replace with Y" pattern matching here for text content. If you want that, you're setting every matched item's field to the exact same new value.
Since an empty box already means "don't touch this," blanking a field needs
a separate signal β a checkbox next to each field does that: check it
and the field disables, and that property is cleared on every match rather
than left alone. Internally this works via a reserved sentinel string
(SearchAndReplaceWorker::eraseText()) that the checkbox sets for you; you
never type it yourself.
So each field has three real states: blank (leave alone), checked (erase), or filled in (overwrite) β not the usual two.
Matches SearchAndReplaceWorker's four target types:
| Category | Typical fields |
|---|---|
| Sheet | title, author, indexrev, and other title-block fields |
| Element | label and the standard element-information fields |
| Conductor | wire number, formula, function, tension/protocol, wire colour, wire section, drawn colour and second colour, two-colour on/off, dash size, line style, thickness, show-text, text size, text rotation on horizontal and vertical runs, both alignments, and the single-line symbols |
| Independent text | the text content itself |
An Advanced mode combines several of these into one operation across mixed selections, rather than working through sheets/elements/conductors one dialog at a time.
Two conductor fields are missing: Cable and Bus. They are the only conductor properties Search & Replace does not touch, in either the simple or the advanced path β which is awkward, because a cable name repeated across forty wires is exactly what you would want to rename in one go. Adding them is the first item of discussion #934. Until then, renaming a cable means editing each conductor by hand.
- This changes many things at once with no fine-grained undo per item β it's one bulk operation. Review the scope tree before committing.
- Because a blank field is a no-op, you can open the dialog, touch only the one property you care about, and everything else on every matched item is guaranteed untouched β safe to run broadly as long as you only fill in what you mean to change.
- This is a GUI-only feature; there's no CLI equivalent. For scripted bulk edits, see Automating QElectroTech β editing the XML directly.
See also: Linking elements Β· Variables & formulas
Getting Started
π Languages β English Β· FranΓ§ais Β· Deutsch
Windows without admin rights β the portable archive, no installer
Guides
Conductors β wire properties, what feeds which export, cables, and hops where wires cross
Wires per terminal β limit the wires on a terminal, chain wiring instead of stars
Printing and exporting β paper, PDF, images, and what each path does differently
Linking elements β master, slave, terminal
PLC modules β I/O tables and linking a wire to a specific point
Using the element editor β drawing tools, saving, checks
Grid size and element size β why symbols aren't all the same scale, and scaling one without leaving the grid
Preferences reference β what each settings page does
Saving and loading settings β your whole setup in one file, to copy or keep
Keyboard-only control β mouseless QET, and what still needs a mouse
Mouse modifiers β what Shift, Ctrl and Alt change while you drag
3D mouse β SpaceMouse pan, zoom and buttons
Aligning items β snap symbols back to the grid, or line them up
Pictures on a sheet β labels, crop, transparency, what they cost in the file
Arcs and curved wires β the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts
Grouping items β select, move and copy several items as one
Finding your place on a sheet β go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan
Showing and hiding kinds of items β hide texts, wire numbers, shapes, pictures, tables or cross-references on every sheet
Drawing faster β place without dragging, the S shortcut bar, command search, gestures
Customising QElectroTech β keys, toolbar size and contents, the gesture ring (partly pending)
Managing collections β folders, writability, building your own shortlist
Templates β reusable multi-element blocks, placed by double-click or drag
Search & Replace β bulk property changes
Building a nomenclature query β the BOM/summary table builder
Linking wires across pages β sheet reports
Variables & formulas β %f, %{label}, sequences
Auto-numbering β schemes, sequences, freezing
Terminal strips β strips, levels, bridges
Title block templates β the .titleblock format
Importing EPLAN parts (.edz) β EPLAN Data Portal
DXF import & export β two unrelated features, one format; command-line export and layers
The project database β the in-memory SQLite cache
Development
Automating QET β CLI, XML formats, external tools
CLI Reference β command line usage
JavaScript Scripting β --run, geometry editing, undo
MCP server β let an AI assistant read, verify and edit projects
Connecting an AI assistant β setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio
Script buttons β stored scripts with an icon, by hand or by an assistant
Live mode β an assistant working in the open project while you watch
Macro recorder β record a task by hand, for an assistant to script
Vision β proposal, under discussion
