Index: e_route-rnd.c =================================================================== --- e_route-rnd.c (revision 32350) +++ e_route-rnd.c (revision 32351) @@ -28,7 +28,31 @@ static int rtrnd_route(pcb_board_t *pcb, ext_route_scope_t scope, const char *method, int argc, fgw_arg_t *argv) { - rnd_trace("woo\n"); + const char *exe = "route-rnd", *route_req = "rtrnd.1.tdx", *route_res = "rtrnd.2.tdx"; + rnd_hidlib_t *hl = &pcb->hidlib; + char *cmd; + int r; + + r = rnd_actionva(hl, "SaveTedax", "route_req", route_req); + if (r != 0) { + rnd_message(RND_MSG_ERROR, "route-rnd: failed to export route request in tEDAx\n"); + return 1; + } + + cmd = rnd_strdup_printf("%s '%s' -o '%s'", exe, route_req, route_res); + if (r != 0) { + rnd_message(RND_MSG_ERROR, "route-rnd: failed to execute the router: '%s'\n", cmd); + free(cmd); + return 1; + } + free(cmd); + + r = rnd_actionva(hl, "LoadTedaxFrom", "route_res", route_res); + if (r != 0) { + rnd_message(RND_MSG_ERROR, "route-rnd: failed to import the route result from tEDAx\n"); + return 1; + } + return 0; }