Read a SchLib
read_schlibParse an Altium .SchLib file into structured JSON containing all symbols, primitives, parameters, and footprint links, for studying library style or preparing editable data.
Instructions
Read an Altium .SchLib file: every symbol with its primitives (pins, rectangles, round_rects, lines, polylines, polygons, arcs, pies, images, text_frames, beziers, ellipses, elliptical_arcs, labels, ieee_symbols), parameters and footprint links as structured JSON. Coordinates are in schematic units (10 units = 1 grid square, not mm). Use it to study a library's symbol style or to fetch data for a read-modify-write. For one symbol whose name you know, get_component is cheaper; to find symbols by name pattern across libraries, search_components; for names alone, list_components. Each symbol is the same JSON shape get_component, export_library and write_schlib use, so a symbol read here can be passed to write_schlib or update_component as it is. Fields such as unique_id, primitive_order, header_params, raw_params, all_pin_count, extra_streams and storage_name are fidelity carriers: pass them back unchanged and the rewrite is byte-identical to the source; omit them when authoring from scratch. A list with no entries and an optional field with no value are omitted rather than empty or null. For a large library, page with limit and offset: the result reports total_count, returned_count, offset and has_more. component_name fetches one symbol and turns paging off.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional: maximum number of symbols to return, 1 or more (default: all) | |
| offset | No | Optional: skip the first N symbols, 0 or more (default: 0) | |
| filepath | Yes | Path to the .SchLib file | |
| component_name | No | Optional: fetch only this symbol, by name in any case; a name the library does not hold is an error naming the available symbols |