Create a PcbDoc with labeled pad and via drill-hole tolerance examples for manual review in Altium Designer.
AltiumPcbDoc.add_pad(...)withhole_positive_tolerance_milsandhole_negative_tolerance_milsAltiumPcbDoc.add_via(...)with the same tolerance options- Reading the authored tolerance values back through
hole_positive_tolerance_milsandhole_negative_tolerance_mils - A control pad and via where the tolerance fields are left unset
From the repository root:
uv run python examples\pcbdoc_add_hole_tolerances\pcbdoc_add_hole_tolerances.pyexamples/pcbdoc_add_hole_tolerances/output/pcbdoc_add_hole_tolerances.PcbDoc
examples/pcbdoc_add_hole_tolerances/output/pcbdoc_add_hole_tolerances.json
Open the generated PcbDoc in Altium Designer and inspect the labeled pads and vias. The JSON file records the intended tolerance settings for each primitive.