Index: mentor_sch.c =================================================================== --- mentor_sch.c (revision 7429) +++ mentor_sch.c (revision 7430) @@ -157,6 +157,7 @@ pcb_hid_actionl("Netlist", "Freeze", NULL); pcb_hid_actionl("Netlist", "Clear", NULL); + pcb_hid_actionl("ElementList", "start", NULL); for(library = dom->root->children; library != NULL; library = library->next) { if (strcmp(library->str, "library") == 0) { @@ -176,6 +177,7 @@ } } + pcb_hid_actionl("ElementList", "Done", NULL); pcb_hid_actionl("Netlist", "Sort", NULL); pcb_hid_actionl("Netlist", "Thaw", NULL); Index: netlist_helper.c =================================================================== --- netlist_helper.c (revision 7429) +++ netlist_helper.c (revision 7430) @@ -238,24 +238,26 @@ } } - /* look up hardwired attributes */ - footprint = htsp_get(&ectx->attr, "pcb-rnd-footprint"); - if (footprint == NULL) - footprint = htsp_get(&ectx->attr, "footprint"); - if (footprint == NULL) - footprint = htsp_get(&ectx->attr, "Footprint"); + refdes = htsp_get(&ectx->nhctx->id2refdes, ectx->id); + if (refdes != NULL) { + /* look up hardwired attributes */ + footprint = htsp_get(&ectx->attr, "pcb-rnd-footprint"); + if (footprint == NULL) footprint = htsp_get(&ectx->attr, "footprint"); + if (footprint == NULL) footprint = htsp_get(&ectx->attr, "Footprint"); + if (footprint == NULL) footprint = ""; - value = htsp_get(&ectx->attr, "pcb-rnd-value"); - if (value == NULL) - value = htsp_get(&ectx->attr, "value"); - if (value == NULL) - value = htsp_get(&ectx->attr, "Value"); + value = htsp_get(&ectx->attr, "pcb-rnd-value"); + if (value == NULL) value = htsp_get(&ectx->attr, "value"); + if (value == NULL) value = htsp_get(&ectx->attr, "Value"); + if (value == NULL) value = ""; - refdes = htsp_get(&ectx->nhctx->id2refdes, ectx->id); + /* create elemet */ + pcb_hid_actionl("ElementList", "Need", refdes, footprint, value, NULL); + printf("Elem '%s' -> %s:%s:%s\n", ectx->id, refdes, footprint, value); + } + else + pcb_message(PCB_MSG_ERROR, "Ignoring part %s: no refdes\n", ectx->id); - /* create elemet */ - printf("Elem '%s' -> %s:%s:%s\n", ectx->id, refdes, footprint, value); - /* free */ for (e = htsp_first(&ectx->attr); e; e = htsp_next(&ectx->attr, e)) { free(e->key);