On This Page (16)
- Initial Experimental Draftsman Support
- SVG Output Contract Updates
- PCB Layer Display Labels
- PcbDoc Polygon Authoring Notes
- Improved SchDoc And SchLib Embedded Images
- New PcbDoc Differential-Pair APIs
- New PcbDoc Component Source Metadata APIs
- Examples
- Bug Fixes
- Schematic Embedded Images Preserve Native Alpha Payloads
- Draftsman Explicit Fonts Clear Document-Font Flags
- Authored PcbDoc Components Do Not Invent Autoposition Fields
- Release Notes Preserve Public History
- Public API Compatibility
- Supported Python Versions
- Functional Gaps
altium-monkey 2026.05.23 Release Notes
Package version: 2026.5.23
2026.05.23 is represented in Python package metadata as the PEP 440 canonical form 2026.5.23.
This release adds the first experimental Python Draftsman .PCBDwf API, promotes explicit PcbDoc differential-pair objects and component source metadata into the Python public API, improves schematic embedded-image payload handling, adds root viewBox controls for SVG output, and restores cumulative release-note history back to the first 2026.04 package version.
Initial Experimental Draftsman Support
AltiumDraftsmanDocument now exposes a conservative Python API for Draftsman files. It can load raw XML and legacy LZ4-compressed .PCBDwf containers, write raw XML outputs, create a blank AD25-profile document, set the linked source PcbDoc filename, inspect pages/items, and preserve unsupported XML subtrees.
The initial typed model includes:
AltiumDraftsmanPageAltiumDraftsmanItemAltiumDraftsmanNoteAltiumDraftsmanNoteElementAltiumDraftsmanTextAltiumDraftsmanPictureAltiumDraftsmanDocumentOptionsDraftsmanColor,DraftsmanPoint,DraftsmanSize,DraftsmanRect, andDraftsmanMarginDraftsmanFontStyleandDraftsmanFontDecorationDraftsmanStandardSheetSize,DraftsmanNoteBorderStyle,DraftsmanHorizontalAlignment, andDraftsmanVerticalAlignment
New authored paths include page.add_note(...), page.add_text(...), page.add_picture(...), document font-style lookup/reuse, page-size helpers, and visual placement helpers such as page.point_from_top_left(...) and page.rect_centered(...).
Three public examples were added:
draftsman_create_blank_projecthello_draftsmandraftsman_add_image
Draftsman support is experimental in this release. Unsupported objects remain raw XML and the API can change as more object families are promoted.
SVG Output Contract Updates
Schematic, schematic-library, PcbDoc, and PcbLib SVG output now have documented root viewBox behavior. Normal output includes a root viewBox; render options expose include_view_box=False for strict comparison lanes or downstream compatibility paths that need width and height without a root viewBox.
The public SVG contract now documents group structure, semantic data-* attributes, relationship JSON linkage for schematic renders, PCB layer metadata, and the PCB enrichment metadata payload.
PCB Layer Display Labels
PcbLayer.to_display_name() now returns default human-facing PCB layer labels such as Top Layer, Bottom Layer, Top Overlay, and Top Solder, while to_json_name() remains the stable token API for machine-readable output.
Parsed PcbDoc SVG output uses resolved board layer-stack display names when the board provides them and falls back to PcbLayer.to_display_name() otherwise. PcbLib footprints do not own a board layer stack, so footprint SVG output uses the default display labels.
PcbDoc Polygon Authoring Notes
PcbDoc region authoring can carry optional polygon realization linkage through polygon_index, subpoly_index, and union_index. This keeps authored region records able to preserve editable polygon relationships when callers know those indexes.
The PcbDoc planning docs also separate typed polygon-pour field promotion from raw record preservation and polygon realization/linkage work, so later polygon modeling can proceed without overclaiming automatic repour behavior.
Improved SchDoc And SchLib Embedded Images
Schematic image extraction and SVG rendering now prefer native payloads stored inside Altium image wrappers such as TdxPNGImage instead of falling back to BMP previews when a better original payload is available.
The image path now preserves PNG and 32-bit BMP alpha and no longer treats the schematic background color as the normal transparency keying path. This improves visual fidelity for embedded logos and transparent schematic graphics while keeping extracted image assets closer to the original Altium payload.
New PcbDoc Differential-Pair APIs
AltiumPcbDoc now parses DifferentialPairs6/Data into pcbdoc.differential_pairs. Each AltiumPcbDifferentialPair exposes:
namepositive_net_namenegative_net_namegather_controlunique_id
Common lookup and authoring helpers are now available:
pcbdoc.get_differential_pair(name)pcbdoc.differential_pair_classespcbdoc.differential_pairs_by_net_namepcbdoc.add_differential_pair(...)PcbDocBuilder.add_differential_pair(...)
The model keeps concrete differential-pair objects separate from differential-pair classes in Classes6/Data, signal classes, routing rules, and project suffix policy.
New PcbDoc Component Source Metadata APIs
AltiumPcbComponent now exposes source and ECO provenance fields that are important for repeated sheets, channels, and board-to-schematic traceability:
channel_offsetsource_designatorsource_unique_idsource_unique_id_segmentssource_hierarchical_pathsource_hierarchy_segmentssource_component_librarysource_component_library_identifier_kindsource_component_library_identifiersource_lib_referencefootprint_description
Component designator/comment autoposition fields are now enum-backed through PcbTextAutoposition:
name_auto_positioncomment_auto_position
Optional component flags are also exposed where present:
lock_stringsenable_pin_swappingenable_part_swappingjumpers_visible
AltiumPcbDoc.add_component(...) and PcbDocBuilder.add_component(...) accept these fields for authored components. Newly authored components no longer invent NAMEAUTOPOSITION or COMMENTAUTOPOSITION fields when callers do not supply explicit values.
Examples
Two public PcbDoc examples were added:
pcbdoc_add_differential_pairscreates a PcbDoc from scratch, adds differential-pair objects with routed member nets, and saves a generated board plus JSON summary.pcbdoc_diff_pair_reportloads the RT Super C1 project, reads differential pair objects and classes, prints a table, and writes JSON plus text reports.
Bug Fixes
Schematic Embedded Images Preserve Native Alpha Payloads
Embedded schematic images with native alpha data now render and extract without forcing background-color keying. PNG payloads and 32-bit BMP payloads keep their alpha channel when the stored Altium wrapper provides it.
Draftsman Explicit Fonts Clear Document-Font Flags
Draftsman note and text helper methods now clear the relevant UseDocumentFont flag when callers supply an explicit font style. This makes generated notes and text render with the requested font family, size, and decoration flags instead of silently falling back to the document default font.
Authored PcbDoc Components Do Not Invent Autoposition Fields
Component authoring no longer emits default NAMEAUTOPOSITION or COMMENTAUTOPOSITION fields unless the caller supplies explicit enum values. This better matches Altium files where those fields are absent and avoids introducing board metadata that was not present in the source intent.
Release Notes Preserve Public History
The public RELEASE_NOTES.md file now carries historical release sections back to 2026.04.15. The Git tags already preserved this history, but the current branch's release-notes file only carried the latest two sections before this release.
Public API Compatibility
Existing documented APIs remain compatible. This release adds new optional PcbDoc component and differential-pair fields and helpers. The component autoposition write behavior is more conservative for new authored components: fields are omitted unless explicitly supplied.
Differential-pair object support reads and writes explicit PcbDoc pair objects. Naming-policy inference from .PrjPcb suffix declarations and broader PCB object-class/room modeling remain future work.
Draftsman APIs are newly introduced and experimental. They are documented for the supported objects above, but the shape may change as dimensions, board views, generated tables, title blocks, and other Draftsman object families are modeled.
Supported Python Versions
This release supports Python 3.11 and Python 3.12.
Python 3.13 is not advertised yet. The core package may work on Python 3.13, but the CadQuery/OCCT/VTK dependency path used for STEP model bounds has not been validated on Python 3.13.
Functional Gaps
No new functional gaps were introduced in this release. The PcbDoc object-model and authoring limitations described in the 2026.05.20 release notes still apply.