|
|
|
|
@ -87,6 +87,16 @@ def main():
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
doc.saveAs(OUT_FCSTD)
|
|
|
|
|
App.closeDocument(doc.Name)
|
|
|
|
|
reopened = App.openDocument(OUT_FCSTD)
|
|
|
|
|
routed_group = reopened.getObject("QETWiring_04_Routed")
|
|
|
|
|
reopened_wires = list(getattr(routed_group, "Group", []) or []) if routed_group else []
|
|
|
|
|
payload["reopened_routed_wire_count"] = len(reopened_wires)
|
|
|
|
|
payload["reopened_has_auto_route"] = any(
|
|
|
|
|
(getattr(wire, "RouteType", "") or "").strip() == "AutoSuggested"
|
|
|
|
|
for wire in reopened_wires
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
with open(OUT_JSON, "w", encoding="utf-8") as handle:
|
|
|
|
|
json.dump(payload, handle, ensure_ascii=False, indent=2)
|
|
|
|
|
print(json.dumps(payload, ensure_ascii=False, indent=2))
|
|
|
|
|
|