Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 7421) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 7422) @@ -154,6 +154,9 @@ return -1; } + pcb_hid_actionl("Netlist", "Freeze", NULL); + pcb_hid_actionl("Netlist", "Clear", NULL); + for(library = dom->root->children; library != NULL; library = library->next) { if (strcmp(library->str, "library") == 0) { if (strcmp(library->children->str, "hierarchical") == 0) { @@ -172,6 +175,9 @@ } } + pcb_hid_actionl("Netlist", "Sort", NULL); + pcb_hid_actionl("Netlist", "Thaw", NULL); + /* for(n = library->children; n != NULL; n = n->next) { printf("n=%s\n", n->str); if (strcmp(n->str, "cell") == 0) { Index: trunk/src_plugins/import_mentor_sch/netlist_helper.c =================================================================== --- trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 7421) +++ trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 7422) @@ -30,6 +30,9 @@ #include "netlist_helper.h" #include "compat_misc.h" +#include "pcb-printf.h" +#include "error.h" +#include "hid_actions.h" nethlp_ctx_t *nethlp_new(nethlp_ctx_t *prealloc) @@ -115,9 +118,12 @@ void nethlp_net_add_term(nethlp_net_ctx_t *nctx, const char *part, const char *pin) { char *refdes = htsp_get(&nctx->nhctx->id2refdes, part); - if (refdes == NULL) - refdes = "n/a"; - printf("net: %s %s (%s) %s\n", nctx->netname, refdes, part, pin); + char term[256]; + if (refdes == NULL) { + pcb_message(PCB_MSG_ERROR, "nethelper: can't resolve refdes of part %s\n", part); + } + pcb_snprintf(term, sizeof(term), "%s:%s", refdes, pin); + pcb_hid_actionl("Netlist", "Add", nctx->netname, term, NULL); } void nethlp_net_destroy(nethlp_net_ctx_t *nctx)