Table of contents
  1. What auto-rewire does
  2. Good times to use it and times to avoid it
  3. How to run it
  4. Reading the result screen
  5. Reviewing the result
  6. If you don't like it
  7. Using it together with hand wiring
  8. Summary

When you place parts and wire them, the wires often wander long ways or there end up too many jumpers, making a drawing that is a hassle to solder. Patterndo's auto-rewire is a feature that keeps the current connections and recalculates the part placement, wiring, and jumpers to turn it into a shorter, tidier drawing. Convenient as it is, it also moves part positions, so there are things to know before using it. This article covers what auto-rewire does, good times to use it and times to avoid it, how to run it, how to read the result screen, and how to undo it if you do not like the outcome.

What auto-rewire does

When you run it, it does the following in order over the whole board.

  1. It re-places the parts so that input-side parts are on the left and display-side parts are on the right.
  2. It draws new wires and jumpers so that all the pin connections can be made in the new placement.
  3. It checks whether the result has the same electrical connections as the original circuit, has no new shorts, and has no part interference, and applies it to the board only if it passes.
  4. If it cannot find a result that meets the conditions, it leaves the original untouched.

Jumpers never overlap or cross, and are placed only over short distances of within 10 holes. Wires are drawn horizontally, vertically, and at 45 degrees. The result screen shows the checks it made: short prevention, pin identity preserved, mechanical clearance, solderability, and jumper reduction.

Good times to use it and times to avoid it

Good times to use itTimes to avoid it or be careful
When you have roughly placed parts and the wires are tangled and you do not know how to tidy it upA drawing whose placement you have tuned precisely by hand
When there are so many jumpers that soldering is a hassleWhen there is a connector whose position at the board edge is fixed
When you imported a schematic photo and have only the connections set, and are making a drawing from it (Importing a Schematic Image)When you are following a drawing you have already finished and started soldering
When you want to compare one drawing against another placementA board you have not saved while working (save the address or a file first)

How to run it

  1. Place all the parts and roughly draw the connections. The targets to redraw are nets that join two or more pins, so if there are no connections yet, nothing changes.
  2. From the More (⋯) menu on the top bar, choose Auto-rewire, or run "Auto-rewire" in Ctrl+K command search.
  3. Check the explanation in the dialog and press Start.

While you are drawing a wire or moving a part, the menu is grayed out, and if you run it by command you get the notice "Finish the current edit before running auto-rewire." Finish and run again.

While it runs

The window shows "Auto-rewire running" with its progress.

ItemMeaning
OptionThe method in use (schematic)
ScopeThe whole board
ProgressNumber of groups completed, placements tried
SearchNumber of routing searches tried so far

The larger the circuit, the longer it takes, and even a small circuit can take from a few seconds to tens of seconds. If you cannot wait, stop it with the Cancel run button or Esc. When you stop it, the notice "Auto-rewire was canceled." appears and the board is unchanged. You cannot close the window while it runs.

Reading the result screen

When it completes, the Rewire result window shows a summary per net. A net is a group of lines connected electrically.

DisplayMeaning
ChangedThe number of nets redrawn with new wiring
KeptThe number of nets left unchanged
FailedThe number of nets that could not be redrawn

Below there is a line that checks whether N target nets matches the total of the results. If the two numbers differ, you get "The result cannot be shown because of an internal calculation error".

Reasons nets were kept

ReasonExplanation
Not a wiring targetA net with fewer than two terminals to join, so there is no wire to redraw. A pin connected to nothing is typical
No cost improvementThe new wiring was no better than the existing, so it was left
Apply conditions not metIt did not pass the safety and quality checks, so it was left

Explanations for failed nets

ExplanationMeaning and what to do
No applicable rewire candidateCould not find wiring that meets the conditions. Try enlarging the board or reducing the number of parts
Group search limit reached, run search limit reachedThe circuit is complex and the search hit its limit. Tidy part of the wiring by hand to lower the complexity and try again
Electrical connectivity equivalence check failedThe new wiring differed from the original connections and was rejected. The board is unchanged
Safety or geometry constraints not metHit a constraint such as jumper length or interference
No valid hole to move the net alias toCould not find a hole to put the label on
Display flow or arrangement constraints not metCannot keep the digit order or alignment of a seven-segment display
The schematic placement does not fit on the boardThe new placement does not fit inside the board. Try making the board larger
Could not rewire after schematic placement, so the original was keptIt placed the parts but could not connect every wire, so the original was kept

If Resolved existing violations is shown, it tells you how many violations that were in the earlier drawing, such as overlapping jumpers, were resolved. When nothing changed, it says "No approved rewire changes". With Run again in the result window you can try once more under the same conditions, and pressing Close leaves the result on the board.

Reviewing the result

Don't solder right after auto-rewire finishes; check the following.

  1. Check the shape in 2D and 3D. See whether the parts have gathered to one side and whether tall parts are too close (2D and 3D Views).
  2. Check diagnostics. See whether it is E 0 W 0 (Reading Diagnostics Messages).
  3. Turn on simulation and check that it does the same thing. Even if the connections are the same, checking is a safe habit (Using Patterndo Simulation).
  4. See whether it is easy to solder. Check that jumpers are not too bunched up and that no wire passes between IC pins (Soldering Basics).
  5. The IC orientation and polarity are separate from the connections, so check them again on the component side and the copper side.

If you don't like it

The whole result of auto-rewire is recorded as a single step in the undo history. Press Ctrl+Z once and the part positions and wiring return to the state before running, and you can apply it again with Ctrl+Y. The undo history disappears when you close the page or load a RAW JSON, so it is safer to save the address or back up to a RAW file before trying (Saving, Sharing, and Backing Up Boards).

Using it together with hand wiring

  • It is efficient to make the big picture with auto-rewire and polish the finish by hand. Just delete the wires you do not like in the result with the delete tool (E) and redraw them with the wire tool (W).
  • Why jumpers are needed and their length limit are covered in detail in Wiring Methods Compared.
  • When reading connections from a schematic photo, you can continue from the imported connection hints into auto-rewire. For this method, see Importing a Schematic Image.

Summary

Auto-rewire is a feature that keeps the connections and makes new part placement, wiring, and jumpers; it is applied only when it passes the checks, and if it fails it keeps the original. Because part positions change, use it carefully on a precisely placed drawing, and do not touch the board while it runs. Review the result with 2D and 3D, diagnostics, and simulation, and if you do not like it, undo with a single Ctrl+Z. The key operations are in Patterndo Keyboard Shortcuts.

This article is general guidance for learning purposes. Specifications and pinouts differ between parts, so check the datasheet of the part you use before real work. For safety-related work, read the cautions for each item first.