Every logical variant Altium registers is modeled: direct, wire, wire group, cable, and harness connections; conflicts; power ports; virtual modules and placeable components (format version 2); functional blocks; and harness definitions. A variant with an unregistered ``$type`` is kept verbatim in ``unknown_elements`` with a diagnostic; when it can carry topology, ``connectivity_complete`` is False.
Read-only multi-board project: the PrjMbd and its system design.
``system_document`` is loaded from the first Altium-visible ``.MbsDoc`` member when that member resolves to an existing file (a relative path, or a drive-absolute or UNC path on Windows); it is None otherwise, and the PrjMbd diagnostics say why.
Members (7)
Kind
Signature
Summary
property
diagnostics -> 'tuple[MultiboardDiagnostic, ...]'
Facade diagnostics (the PrjMbd and MbsDoc cross-check).
``members`` keeps every ``Document<n>``-like section in numeric order; the role properties consider only ``altium_visible`` members. Sections and keys are matched case-sensitively like Altium: a repeated section merges into the first, and the first value of a repeated key wins.
Members (9)
Kind
Signature
Summary
property
assembly_member -> 'PrjMbdMember | None'
The first Altium-visible ``.MbaDoc`` member, or None.
Read-only System facade; each child is prepared once in this generation.
Native link/alias evidence remains available in netlist. The common C0 graph stores complete admitted child-net inventory, including internal nets that have no MBS endpoint. Unresolved endpoints do not acquire invented net IDs.
One child object that carries a name of a child net.
Attributes: kind: Net label, port, or power port. text: The name it carries. document_path: Child document path as the compiled project reports it: POSIX and relative to the child project folder when the document lies below it. object_unique_id: The object's unique id in that document.
class
MbsChildContributorAliasSource
from altium_monkey.altium_multiboard_netlist importMbsChildContributorAliasSource
The compiled child pin behind one module terminal.
The join is exact only: the system component ``SourceId`` equals the ``DM_UniqueId`` of a child component marked ``System=Connector``, and the system pin ``SourceId`` equals the child pin ``UniqueIdName``, case-sensitive, with no name or pin-number fallback.
Attributes: terminal_ref: The system pin. module_ref: The module occurrence that owns the terminal. design_unit: Normalized path of the resolved child project member, or None when the module did not resolve. status: ``exact`` or ``unresolved``. reason: Why the join failed, or None when it is exact. component_unique_id: The system component ``SourceId``, or None. pin_unique_id_name: The system pin ``SourceId``, or None. child_net_ref: The child net holding the pin, or None. It is a compiled net id, valid within one netlist only: a later compile or a rename can change it. Pin and object unique ids are the durable targets. child_net_name: The live child net name as Altium's import computes it: None when the net has no pin, or one pin and fewer than two net items; else the flattened net name.
class
MbsChildNet
from altium_monkey.altium_multiboard_netlist importMbsChildNet
One compiled flat net of a child project that a terminal joins.
Attributes: design_unit: Normalized path of the child project member. ref: The compiled net id within that child project, valid within one netlist only. name: The flattened net name. name_is_generated: True when no net label, port, or power port names the net. pin_count: Pins on the net. item_count: Net items other than wires (pins, labels, ports, ...). contributors: Objects that name the net, in compiled item order.
class
MbsChildNetAliasSource
from altium_monkey.altium_multiboard_netlist importMbsChildNetAliasSource
Altium saves only conflicts whose old value differs from the current one.
Attributes: kind: Conflict kind from ``$type``. is_resolved: ``isResolved``. object: The conflicted object (a pin for ``PIN_NET_NAME``), resolved pins first; None when absent or dangling. related_objects: Resolved ``relatedObjects`` in stored order; dangling ids are left out and reported. old_value: ``oldValue``, the value when the conflict was recorded. current_value: The value now in the document: the object pin's ``ExternalNetName`` for ``PIN_NET_NAME``, else None.
class
MbsConnection
from altium_monkey.altium_mbsdoc importMbsConnection
Simple connections (direct, wire, wire group) have one entries connection and no components or entries of their own. Compound connections (cable, harness) carry their own components, connection entries, ``entryPinMap``, module-entry links (``entries_connections``), links that start at an inter-connection entry (``inter_connected_entries_connections``), and internal links (``connection_entries_connections``).
``entry1`` and ``entry2`` are raw entry definition ids. ``connections`` pairs ``connections1`` with ``connections2`` by position, stopping at the shorter list, and is empty unless both lists are stored (Altium's ``Zip``).
class
MbsContainer
from altium_monkey.altium_mbsdoc importMbsContainer
Attributes: members: Every archive member in archive order, duplicates included. format_version: ``core.json`` ``version``, or None when unavailable. modified: ``core.json`` ``modified`` timestamp text, or None.
Attributes: index: Zero-based position in the archive's central directory. raw_name: Stored name, for example ``Pages\page_1.json``, decoded as UTF-8 (U+FFFD for invalid bytes) as .NET decodes it. name: Name with backslashes normalized to ``/``. size: Declared uncompressed size in bytes. compressed_size: Stored compressed size in bytes. compression_method: ZIP compression method (0 is stored, 8 is deflate, 9 is Deflate64; any other method is unreadable). role: Member role from the file name. Any file name containing ``page_`` is a page, at any folder depth. page_id: Page id when the file name is ``page_<digits>.json`` and the digits fit an Int32, else None. shadowed: True when an earlier member has the same normalized name, or, for a well-known role other than a page, the same file name; the earlier member wins. Pages are never shadowed: Altium loads every page member. platform: The "version made by" host byte of the central directory entry (3 is Unix); it decides how ``file_name`` splits the name.
Members (2)
Kind
Signature
Summary
property
at_root -> 'bool'
True when the member is not inside a folder.
property
file_name -> 'str'
.NET ``ZipArchiveEntry.Name``, which Altium matches members by:
class
MbsEntriesConnection
from altium_monkey.altium_mbsdoc importMbsEntriesConnection
A module entry or a connection entry (system connector side).
Attributes: pins: Pins whose final ``entryPinMap`` row names this entry, in first row order. A pin mapped twice belongs to the entry of its last row (Altium's entry pin map overwrites). logical_connection: Resolved ``logicalConnection``, or None. linked_component: Resolved ``linkedComponent``, or None. is_connection_entry: True for entries owned by a compound connection. is_inter_connection: ``isInterConnection`` (connection entries). termination_type: Raw ``terminationType`` value, or None when absent.
Members (1)
Kind
Signature
Summary
property
designator -> 'str | None'
The defined designator when set, else the calculated one.
class
MbsEntryDefinition
from altium_monkey.altium_mbsdoc importMbsEntryDefinition
A harness definition: a harness source definition.
A synchronization aid written only with Altium's ``MBS.HarnessSource`` option on, and ignored by Altium on load while that option is off. This reader always reads it. It is not topology: the instantiated harness connection stays the connectivity authority.
One per-link system net, as Altium compiles it (one per pin pair).
Attributes: ref: The pin pair (Altium's per-link net object). physical_connection_ref: The physical connection holding the pair. link_group_ref: The logical connection that owns the link. kind: Physical kind. endpoints: Pins in persisted ``pin1``, ``pin2`` order. defined_name: User-defined name, or None. derived_name: Distinct non-empty resolved endpoint names in endpoint order joined with ``/``, or None when there are none. effective_name: ``defined_name`` when set, else ``derived_name``; the only name Altium reports for the link. name_origin: Where ``effective_name`` came from.
class
MbsLinkAliasSource
from altium_monkey.altium_multiboard_netlist importMbsLinkAliasSource
One module of the system document and the child project behind it.
Attributes: module_ref: The module. designator: The module designator (for example ``M3``), or None. design_unit: Normalized path of the resolved child project member, or None when the module did not resolve.
class
MbsModuleResolution
from altium_monkey.altium_multiboard importMbsModuleResolution
Resolution of one module occurrence to a PrjMbd board-project member.
Attributes: module_ref: The module occurrence. status: Resolution outcome. rule: Rule that decided the outcome. member: The resolved member, or None unless ``status`` is resolved. authored_source: ``sourceProject`` exactly as stored, or None. evidence: What was compared and found. diagnostics: Resolution diagnostics for this module in report order.
class
MbsModuleResolutionEvidence
from altium_monkey.altium_multiboard importMbsModuleResolutionEvidence
What the resolver compared and found for one module.
Attributes: source_path: ``sourceProject`` normalized; a relative source is recomposed in the PrjMbd folder frame (relative to the PrjMbd folder, or absolute when the system design member is absolute), else it keeps its absolute, UNC, or rooted form. None when no source path is stored. source_path_form: Lexical form of the authored ``sourceProject``. source_member: The member ``source_path`` names, of any kind, or None. source_on_disk: Whether a source that names no member is an existing file; None when not checked (a member, a rooted or drive-relative path, or no folder to resolve against). name_keys: Case-folded project-name keys taken from the module. name_candidates: Board members matched by the project-name stem rule. guid_candidates: Board members whose ``ManagedProjectGUID`` equals the module ``projectGuid``; recorded only for an unresolved module. A GUID never resolves a module. mapping_key: The caller mapping key that applied, if any. mapping_target: The caller mapping value that applied, if any. board_file_path: ``boardFileName`` rebased onto the resolved child folder, relative to the PrjMbd folder; None when not checked. board_file_in_project: Whether ``boardFileName`` lies inside the authored source project folder; None when not checked. board_file_exists: Whether the rebased board file exists; None when not checked. source_found_by: How the source in ``source_on_disk`` was found. board_file_found_by: How the board file in ``board_file_exists`` was found.
class
MbsNetAlias
from altium_monkey.altium_multiboard_netlist importMbsNetAlias
Compare refs, not ``full_id`` text: a ``document_id`` containing a backslash makes the joined text ambiguous (Altium's full id has the same flaw), while ``(document_id, path)`` stays exact.
Attributes: document_id: MbsDoc ``uniqueId``, or the fallback document path when the document has none. path: Integer ids from the top-level owner down to the object itself, for example ``(module, component, pin)``.
Members (4)
Kind
Signature
Summary
method
child(self, object_id: 'int') -> 'MbsObjectRef'
Reference to an object owned by this one.
property
full_id -> 'str'
``uniqueId\a\b\id``, Altium's full id form.
property
id -> 'int'
The object's own integer id (document-local, not unique).
property
parent -> 'MbsObjectRef | None'
Reference to the owning object, or None for a top-level object.
class
MbsParameter
from altium_monkey.altium_mbsdoc importMbsParameter
Attributes: ref: Parameter identity (owner path plus parameter id). name: Parameter name; an absent name reads as the empty string. value: Parameter value, or None when the ``value`` key is absent (Newtonsoft omits a null value). json_pointer: Location in ``logical.json``.
class
MbsPhysicalConnection
from altium_monkey.altium_mbsdoc importMbsPhysicalConnection
One system-level net across boards (an altium_monkey definition).
A connected component over link endpoints, harness internal links, and terminals of one module occurrence joined to the same named child net. It has no primary name; ``aliases`` lists every name with its source.
Attributes: index: Position in first-terminal order. terminals: Member pins in terminal order. links: Member links in link order. child_nets: Child nets per module occurrence. aliases: Every name, grouped by origin, each once per source.
Members (1)
Kind
Signature
Summary
property
names -> 'tuple[str, ...]'
Distinct alias names in alias order.
class
MbsSystemNetlist
from altium_monkey.altium_multiboard_netlist importMbsSystemNetlist
System nets of one multi-board project, with their links and aliases.
Attributes: nets: System nets in first-terminal order. links: Per-link nets in connection order. link_groups: Mapped and total pin counts per logical connection. terminals: Every connector pin with its links and child join. occurrences: Every module with its designator and child project. child_nets: Compiled child nets joined by at least one terminal. diagnostics: Every diagnostic behind the netlist, in order: the system document's read diagnostics, module resolution diagnostics, harness name cycles, then child compile, join, and stale-name diagnostics. connectivity_complete: False when the system document's topology is incomplete, a harness name chain cycles, or any module terminal has no exact child join (unresolved module, failed compile, missing component or pin).
Attributes: ref: The pin. owner_ref: The module, virtual module, placeable component, or connection that owns the pin's component. entry_ref: The pin's entry (last ``entryPinMap`` row), or None. pin_number: Pin number, or None. pin_name: Pin name, or None. snapshot_name: Persisted ``ExternalNetName``, or None. resolved_snapshot_name: ``ExternalNetName`` as Altium resolves it at runtime (through a harness far end when there is one), or None. links: The links this pin is an endpoint of, in link order. child_join: The compiled child pin behind a module terminal, or None for a pin that is not on a module.
class
MbsTerminalAliasSource
from altium_monkey.altium_multiboard_netlist importMbsTerminalAliasSource
A logical element this reader does not model, kept verbatim.
Attributes: native_type: ``$type`` token, or the registered token of the unmodeled collection (for example ``__logicalPowerPort``); None when a polymorphic element has no ``$type``. json_pointer: Location in ``logical.json``. raw: The element's JSON value, unchanged. It takes part in equality but not in the hash, so the element and every element holding it stay hashable. topology_bearing: True when the element sits where connectivity is stored, so skipping it leaves connectivity incomplete.
class
MbsVirtualModule
from altium_monkey.altium_mbsdoc importMbsVirtualModule
Attributes: code: Catalog code, or the raw code string when a producer reported a code outside ``MultiboardDiagnosticCode``. severity: Diagnostic severity. message: Human-readable description. document: Case-relative POSIX path of the document, if any. section: Model or file section, for example an INI section name. module_ref: Full id of the module occurrence, if any. element_id: Full id of the element inside the document, if any. detail: Free-form detail, for example an unknown ``$type`` value.
from altium_monkey.altium_multiboard importMultiboardDiagnostics
classMultiboardDiagnostics()->'None'
Ordered collector of multi-board diagnostics.
``unknown_field`` reports are aggregated: one diagnostic per (element kind, field) keeps the position of the first occurrence, and its message carries the running occurrence count.
One ``Document<n>``-like member section of a multi-board project.
Attributes: section: INI section name as authored, for example ``Document3``. index: Numeric ``n`` of the section name (0 to 2**32 - 1). line: 1-based line of the section's first header. altium_visible: Whether this member is in Monkey's usable projection of Altium's view: an exact-case ``Document<n>`` with ``n >= 1`` and no leading zero, within the run contiguous from ``Document1``, holding an exact-case ``DocumentPath`` key. The section/run rule mirrors Altium enumeration; the path-key requirement is Monkey's public-reader contract and does not settle managed-only members. authored_path: ``DocumentPath`` exactly as written (Windows form). For a section whose only path key differs in case, that key's value. normalized_path: ``/``-separated, lexically collapsed path in the authored case; relative to the PrjMbd folder for relative members. path_form: Lexical form of ``authored_path``. resolved_path: Host path of the member: a relative member joined lexically to the PrjMbd folder, a drive-absolute or UNC member as written (Windows hosts only), with the on-disk case when it was found ignoring case. None for rooted, drive-relative, and empty paths, for a Windows path on another host, or when the reader has no folder. exists: Whether the member is an existing file; None when it was not checked. kind: Kind by extension. document_unique_id: ``DocumentUniqueId``, None when absent or blank. managed_project_guid: ``ManagedProjectGUID``, None when absent or blank. vault_guid: ``VaultGUID``, None when absent or blank. project_name: ``ProjectName``, None when absent or blank. options: Every ``(key, value)`` of the section in file order. found_by: How the member file was found, or None when it was not checked.
function
load_system_netlist_json
from altium_monkey.altium_multiboard_netlist import load_system_netlist_json
Validate and decode system netlist JSON written by ``MbsSystemNetlist.to_json``.
The payload's own ``schema`` field selects the contract; only ``altium_monkey.multiboard.system_netlist.v1`` is accepted.
Raises: ValueError: The payload is not JSON or names another schema. GeneratedSchemaDecodeError: The payload fails the v1 schema.
constant
MBS_NO_PIN_ID
from altium_monkey.altium_mbsdoc importMBS_NO_PIN_ID
MBS_NO_PIN_ID: int
enum
MbsChildContributorKind
from altium_monkey.altium_multiboard_netlist importMbsChildContributorKind
enum MbsChildContributorKind
Kind of child object that names a child net.
Members (3)
Kind
Signature
Summary
member
NET_LABEL= 'net_label'
member
PORT= 'port'
member
POWER_PORT= 'power_port'
enum
MbsChildJoinReason
from altium_monkey.altium_multiboard_netlist importMbsChildJoinReason
enum MbsChildJoinReason
Why a terminal has no child pin.
Members (4)
Kind
Signature
Summary
member
MODULE_UNRESOLVED= 'module_unresolved'
member
CHILD_COMPILE_FAILED= 'child_compile_failed'
member
COMPONENT_NOT_FOUND= 'component_not_found'
member
PIN_NOT_FOUND= 'pin_not_found'
enum
MbsChildJoinStatus
from altium_monkey.altium_multiboard_netlist importMbsChildJoinStatus
enum MbsChildJoinStatus
Whether a terminal joined a pin of its compiled child project.
Members (2)
Kind
Signature
Summary
member
EXACT= 'exact'
member
UNRESOLVED= 'unresolved'
enum
MbsConflictKind
from altium_monkey.altium_mbsdoc importMbsConflictKind
enum MbsConflictKind
Conflict kind, from the conflict ``$type``.
Members (1)
Kind
Signature
Summary
member
PIN_NET_NAME= 'pin_net_name'
enum
MbsConnectionKind
from altium_monkey.altium_mbsdoc importMbsConnectionKind
enum MbsConnectionKind
Logical connection kind, from the connection ``$type``.
Members (5)
Kind
Signature
Summary
member
DIRECT= 'direct'
member
WIRE= 'wire'
member
WIRE_GROUP= 'wire_group'
member
CABLE= 'cable'
member
HARNESS= 'harness'
enum
MbsContainerMemberRole
from altium_monkey.altium_mbsdoc importMbsContainerMemberRole
enum MbsContainerMemberRole
Role of an archive member, from its file name (the last name part).
Members (8)
Kind
Signature
Summary
member
STYLES= 'styles'
member
CORE= 'core'
member
PARAMETERS= 'parameters'
member
LOGICAL= 'logical'
member
PAGE= 'page'
member
OPTIONS= 'options'
member
DEFAULTS= 'defaults'
member
UNKNOWN= 'unknown'
enum
MbsEntryType
from altium_monkey.altium_mbsdoc importMbsEntryType
enum MbsEntryType
An entry's ``entryType``.
Members (2)
Kind
Signature
Summary
member
MALE= 0
member
FEMALE= 1
enum
MbsLinkKind
from altium_monkey.altium_multiboard_netlist importMbsLinkKind
enum MbsLinkKind
Physical kind of one link, from the physical connection ``$type``.
Members (4)
Kind
Signature
Summary
member
PIN_TO_PIN= 'pin_to_pin'
member
WIRE= 'wire'
member
INTERNAL= 'internal'
member
UNKNOWN= 'unknown'
enum
MbsLinkNameOrigin
from altium_monkey.altium_multiboard_netlist importMbsLinkNameOrigin
enum MbsLinkNameOrigin
Whether a link's effective name is user-defined or derived.
Members (2)
Kind
Signature
Summary
member
DEFINED= 'defined'
member
DERIVED= 'derived'
enum
MbsModuleResolutionRule
from altium_monkey.altium_multiboard importMbsModuleResolutionRule
enum MbsModuleResolutionRule
Rule that decided a module resolution.
Members (5)
Kind
Signature
Summary
member
MEMBER_PATH= 'member_path'
member
PROJECT_NAME_STEM= 'project_name_stem'
member
EXPLICIT_MAPPING= 'explicit_mapping'
member
SOURCE_EMPTY= 'source_empty'
member
UNMATCHED= 'unmatched'
enum
MbsModuleResolutionStatus
from altium_monkey.altium_multiboard importMbsModuleResolutionStatus
enum MbsModuleResolutionStatus
Outcome of resolving one module occurrence to a child project.
Members (4)
Kind
Signature
Summary
member
RESOLVED= 'resolved'
member
UNRESOLVED= 'unresolved'
member
AMBIGUOUS= 'ambiguous'
member
NOT_APPLICABLE= 'not_applicable'
enum
MbsNetAliasOrigin
from altium_monkey.altium_multiboard_netlist importMbsNetAliasOrigin
enum MbsNetAliasOrigin
Where one system net name comes from (an altium_monkey taxonomy).
Members (4)
Kind
Signature
Summary
member
LINK_NAME= 'link_name'
member
TERMINAL_SNAPSHOT= 'terminal_snapshot'
member
CHILD_NET= 'child_net'
member
CHILD_CONTRIBUTOR= 'child_contributor'
enum
MbsObjectKind
from altium_monkey.altium_mbsdoc importMbsObjectKind
enum MbsObjectKind
Identity namespace of a logical object.
An integer reference resolves only within its expected kind. Module entries, connection entries, and virtual module and placeable component entries share ``ENTRY``; all pins share ``PIN``.