Open a blank schematic, add a small gallery of circular arcs and full circles,
and save the modified .SchDoc.
This example keeps the two together because Altium stores both with the same schematic arc record. A full circle is just a 360-degree arc.
- load an existing
SchDoc - create several detached full circles with
make_sch_full_circle(...) - create several detached partial arcs with
make_sch_arc(...) - insert each object with
AltiumSchDoc.add_object(...) - persist the change with
AltiumSchDoc.save(...)
- using the public mil-facing API for circular geometry without dealing with raw internal coord fractions
- creating detached full circles with ascending radii, including fractional mil radius values
- creating detached partial arcs with different start and end angles
- using
SchPointMilsfor public center coordinates - using
LineWidthandColorValueto vary stroke thickness and color - reopening the written file and inspecting the created arc objects
From the project root:
uv run python examples\schdoc_add_arc_and_full_circle\schdoc_add_arc_and_full_circle.pyThis sample uses:
examples/schdoc_add_arc_and_full_circle/input/blank.SchDoc
The script writes:
examples/schdoc_add_arc_and_full_circle/output/blank_with_arc_and_full_circle.SchDoc
The output file should contain:
- a top row of black full circles with ascending radii:
150.0 mil,250.5 mil,350.25 mil, and450.75 mil - a middle row of partial arcs with different start/end angle sweeps
- a bottom row of full circles showing line color and
LineWidthvariation, includingSMALLEST,SMALL,MEDIUM, andLARGE - all geometry defined through the public mil-facing API, not raw internal schematic coord values
The script also prints the reopened centers, radii, angles, widths, and colors so the example is easy to sanity-check without inspecting the binary file directly.