Create a schematic harness connector group inside an existing blank schematic through the public connector-owned API.
This sample shows:
- opening an existing
input/blank.SchDoc make_sch_harness_connector(...)withbounds_mils: SchRectMilsmake_sch_harness_entry(...)with public mil-based offsets andSchFontSpecmake_sch_harness_type(...)withlocation_mils: SchPointMils- adding the matching harness port and signal harness
- matching the reference composition in
assets/reference/harness_example_ref.SchDoc
Only the connector group root is added to the document:
schdoc.add_object(connector)Harness entries and harness type labels are connector-owned and are not valid
top-level schdoc.add_object(...) calls.
uv run python examples\schdoc_add_harness_connector\schdoc_add_harness_connector.pyThe script writes:
output/harness_example.SchDoc