Files
dxdesigner-part-replacement/docs/superpowers/specs/2026-09-04-dxdesigner-795-parameter-presentation-transfer-design.md
T

11 KiB

DxDesigner 7.9.5 Parameter Presentation Transfer Design

1. Purpose

This document extends the existing DxDesigner 7.9.5 multi-project part replacement design. The replacement remains a native Replace Part operation with Library Wins, but it now has one controlled post-replacement step:

  • copy the new symbol's exact Part Label value into the instance Value;
  • preserve presentation metadata for parameters that existed on the old instance and have an unambiguous same-name parameter on the new instance;
  • never copy an old ordinary parameter value into the new instance.

The material identifier remains the Part Number attribute. Values such as 4300-CA2260-A300 are examples, not a syntax restriction. Identity comparison trims surrounding whitespace and is case-insensitive, while reports preserve the original spelling.

This document supersedes only the attribute semantics, snapshot fields, Apply steps, and verification rules described below. All existing requirements for backup, native replacement, RefDes, placement, origin, units, pins, connectivity, unrelated objects, recovery, evidence correlation, and evaluation-only release status continue to apply.

2. Non-Goals

  • Rebuilding a symbol or its pins through scripts.
  • Copying old ordinary parameter values over new library values.
  • Creating parameters that existed only on the old symbol.
  • Reconnecting, moving, creating, or deleting wires.
  • Using UI coordinates, SendKeys, or timing delays.
  • Claiming an unsupported 7.9.5 property API without probe and live evidence.

3. Parameter Identity

Parameter names are normalized by trimming surrounding whitespace and applying a case-insensitive comparison. The original name remains in evidence and reports.

For each component and owner scope:

  • one old and one new parameter with the same normalized name form an unambiguous match;
  • an old-only parameter is not recreated and is reported as removed;
  • a new-only parameter keeps its new-library value and presentation defaults;
  • duplicate normalized names on either side are ambiguous and receive no automatic presentation transfer.

An ambiguous ordinary parameter creates a warning. An ambiguous Part Label or Value prevents the mandatory Value operation and is therefore a hard failure.

4. Trusted Pre-Replacement Capture

The bridge must capture and durably publish a complete trusted snapshot before it selects components or opens native Replace Part. Capture occurs separately for every matched logical component, every placed unit, and every existing parameter instance. It may not be reconstructed from post-replacement state.

The controller must correlate this snapshot with the job, project, mapping, command identifier, active-project identity, expected component count, and current project fingerprint. If any matched component, unit, parameter value, or required presentation field cannot be read unambiguously, the bridge stops before replacement and reports the exact object and field.

Each parameter snapshot contains:

  • original and normalized parameter name;
  • current value, for reporting and rollback comparison only;
  • logical component key and RefDes;
  • owner scope and placed-unit identity, when the parameter is unit-owned;
  • visible state;
  • schematic text origin or position in invariant coordinates;
  • rotation or orientation;
  • horizontal and vertical justification or the equivalent alignment values;
  • color;
  • font family or style identifier when exposed;
  • text size or height/width fields exposed by the certified route; and
  • any additional stable presentation field explicitly named by the compatibility profile.

The schema distinguishes component/unit placement coordinates from parameter text coordinates. A parameter coordinate must never substitute for component origin or component position evidence.

5. Apply Sequence

For one mapping group in one project, the bridge performs these ordered steps:

  1. Validate the correlated command, active project, saved state, inventory fingerprint, certification, and expected count.
  2. Capture and durably publish the trusted pre-replacement component, unit, pin, network, ordinary parameter, Part Label, and Value evidence.
  3. Select exactly the logical components identified by the controller.
  4. Invoke or request the native Replace Part dialog.
  5. Require the exact target Part Number and Library Wins.
  6. Observe native completion through the certified route or explicit manual continuation; no blind delay is allowed.
  7. Re-enumerate the replaced objects and verify their target identity.
  8. Read the new symbol's exact Part Label value.
  9. Write that exact value to the instance Value and read it back.
  10. Transfer presentation metadata for unambiguous same-name parameters.
  11. Export the post-transfer snapshot and a field-level transfer result.
  12. Let Python run hard verification and produce warnings/differences.

No ordinary parameter value assignment is permitted in step 10. Library Wins remains authoritative for ordinary parameter values.

6. Value Rule

Value is the only parameter whose value is written by the post-replacement step.

  • Source: the exact new-symbol Part Label value.
  • Destination: the replaced instance's Value parameter.
  • Comparison: exact string equality after the write; no case folding or whitespace normalization changes the stored value.
  • Presentation: inherit all certified presentation fields from the old instance's Value when it existed unambiguously.
  • Default presentation: when the old instance had no Value, retain the new symbol's default Value presentation.

Missing, empty, ambiguous, unreadable, or unwritable Part Label; missing, ambiguous, or unwritable Value; a write error; or a read-back mismatch is a hard failure. The project cannot be saved and the existing verified Undo or close-without-save recovery path is required.

Failure to copy only a Value presentation field is a warning, not a hard failure, provided the exact Value content was written and read back.

7. Ordinary Parameter Presentation Transfer

For every unambiguous same-name ordinary parameter, the bridge attempts to copy each presentation field from the trusted old snapshot to the new parameter. Values remain those supplied by the new library.

Each failed field produces a parameter_style_inheritance_failed warning with job, project, mapping, logical key, RefDes, unit or owner scope, parameter name, field name, old presentation value, observed new value, API route, and error. The warning does not trigger Undo and does not by itself block save.

The reports also distinguish:

  • parameter_removed_by_new_symbol;
  • parameter_added_by_new_symbol;
  • parameter_value_changed_by_library;
  • parameter_name_ambiguous; and
  • successfully inherited presentation fields.

8. Verification and Recovery

Hard verification still requires the exact target Part Number, component count, RefDes, hierarchy, unit set, component origin and position, rotation, mirror state, pin-number set, pin coordinates, pin-to-net identity, and no unrelated component changes.

It additionally requires:

  • one nonempty, unambiguous new Part Label per replaced instance;
  • exact Value == Part Label after the write and in the persisted reread; and
  • no ordinary parameter value assignment performed by the transfer adapter.

Presentation warnings remain visible at the project save gate and in CSV, JSON, and HTML reports. They do not override a hard verification result.

If any hard condition fails, Undo must be verified against the complete trusted pre-replacement snapshot, including component/unit geometry, connectivity, parameter values, and parameter presentation. If exact Undo cannot be proven, the project must be closed without saving or restored from the verified backup.

9. Compatibility Profile

The read-mostly probe records the actual 7.9.5 routes and types for:

  • enumerating parameter instances and their owner scope;
  • reading Part Label and Value;
  • writing and reading back Value;
  • reading and writing each supported presentation field; and
  • distinguishing component placement coordinates from parameter text coordinates.

Production Apply is blocked unless the Part Label read route and Value write/read-back routes are live-certified. An unavailable ordinary presentation field disables only that field's automatic transfer and produces an explicit warning/capability result.

The profile promotion evidence must identify the exact DxDesigner 7.9.5 build, central-library identity or fingerprint, disposable fixture, mapping, route, field type, observed before/after values, tester, date, and evidence hashes.

10. Protocol and Modules

The snapshot protocol advances to format version 3. Version 3 adds structured parameter instances and presentation metadata. Version 1 lacks independent component origin evidence and remains unsafe. Version 2 lacks parameter presentation evidence and cannot authorize the new Apply workflow. Existing version 1 or 2 jobs must be rejected with a stable re-inventory-required error; they are never silently upgraded.

Responsibilities remain separated:

  • Python domain/protocol modules define immutable parameter and presentation evidence.
  • A dedicated Python parameter-transfer policy module matches names, classifies differences, and verifies results without accessing DxDesigner.
  • A dedicated ASCII-only VBScript parameter-transfer adapter performs the certified Part Label, Value, and presentation operations.
  • The bridge coordinates selection, native replacement, adapter invocation, and evidence publication, but does not decide warning or save policy.
  • Controller/operator modules consume correlated results and preserve the existing save and recovery gates.

11. Tests and Acceptance

Automated tests cover:

  • representative material numbers such as 4300-CA2260-A300 without imposing a fixed syntax;
  • capture before selection or dialog invocation;
  • multiple logical components, units, and parameter coordinate sets;
  • case-insensitive trimmed name matching and ambiguous duplicates;
  • old-only, new-only, hidden, and visible parameters;
  • ordinary values remaining from the new library;
  • each presentation field copied independently;
  • field-level warning behavior and report contents;
  • exact Part Label -> Value write/read-back;
  • missing/empty/ambiguous fields and forced write failure causing Undo;
  • persisted Value verification after save;
  • exact Undo restoration of values and presentation; and
  • real cscript execution through a fake object host without source-text-only claims.

Live 7.9.5 acceptance uses disposable projects and records screenshots or machine evidence for parameter positions, colors, sizes, orientation, visibility, ordinary new-library values, exact Value, Undo, save, and persisted reread. Until every required route and case passes, the package remains evaluation-only.