Understand the Altium Schematic File Format Structure
masterAltium schematic files are structured as OLE compound documents containing a FileHeader stream. The stream consists of an initial Header object followed by indexed objects starting from zero.
Object Hierarchy and Ordering
- Header: The first object (equivalent to
|RECORD=0). - Sheet: The first indexed object (index 0) immediately following the header.
- Indexed Objects: All subsequent objects are indexed starting from 0. Their type is determined by the
|RECORDproperty. - Ownership: Objects have a hierarchical ownership relationship and are stored in depth-first order. For example, a
Componentobject typically appears before its child objects (like pins or lines).
To correctly parse the file, follow the depth-first traversal to maintain the parent-child relationships between components and their constituent parts.