Crates.io | altium |
lib.rs | altium |
version | 0.2.1 |
source | src |
created_at | 2023-07-25 00:42:05.898726 |
updated_at | 2023-10-23 21:09:25.576877 |
description | A library for processing Altium file types |
homepage | |
repository | https://github.com/pluots/altium |
max_upload_size | |
id | 925065 |
size | 3,520,095 |
A tool to process Altium file types. Currently this tool is in alpha and only has minimal components fully functioning (so please expect breaking changes!).
This is intended as a replacement for my original tool
PyAltium
The goal of this project is to support most file types used by Altium. Reading is a priority, writing will be implemented for some types. The status of various file types is listed below:
Extension | List Items | Display | Write | Documentation | |
---|---|---|---|---|---|
Binary Schematic Library | .SchLib | ✓ | Poorly | Good | |
Binary PCB Library | .PcbLib | ||||
Binary Schematic Doc | .SchDoc | ✓ | |||
Binary PCB Doc | .PcbDoc | ||||
Draftsman Doc | .PcbDwf | ||||
PCB Project | .PrjPcb | ||||
Material Library | .xml | N/A | |||
Any templates | Not Planned |
See altium/examples
for some sample usage. Example reading components in a
schematic library:
use altium::SchLib;
fn main() {
let lib = SchLib::open("tests/samples/schlib/simple.SchLib").unwrap();
// List all librefs stored in this schematic library
for meta in lib.component_meta() {
println!(
"libref: {}, description: {}",
meta.libref(),
meta.description()
);
}
// Get a single component by libref
let mycomp = lib.get_component("Resistor - Standard").unwrap();
// Write that image to a SVG file. Note that output is pretty buggy still.
mycomp.save_svg("resistor.svg").unwrap();
}
Currently, this is licensed under Apache 2.0.