Index: export_openems.c =================================================================== --- export_openems.c (revision 33274) +++ export_openems.c (revision 33275) @@ -170,8 +170,9 @@ { const char *suffix = ".m"; pcb_mesh_t *mesh = pcb_mesh_get(MESH_NAME); + char **val = openems_attribute_list[HA_openemsfile].value; - if ((PCB != NULL) && (openems_attribute_list[HA_openemsfile].default_val.str == NULL)) + if ((PCB != NULL) && ((val == NULL) || (*val == NULL) || (**val == '\0'))) pcb_derive_default_filename(PCB->hidlib.filename, &openems_attribute_list[HA_openemsfile], suffix); if (mesh != NULL) { @@ -668,7 +669,7 @@ const char *filename; char *runfn = NULL, *end; int save_ons[PCB_MAX_LAYER]; - int i, len, fmt_matlab; + int len, fmt_matlab; FILE *fsim; openems_ovr = 0; @@ -675,8 +676,6 @@ if (!options) { openems_get_export_options(hid, 0); - for (i = 0; i < NUM_OPTIONS; i++) - openems_values[i] = openems_attribute_list[i].default_val; options = openems_values; } @@ -956,6 +955,7 @@ openems_hid.fill_rect = openems_fill_rect; openems_hid.calibrate = openems_calibrate; openems_hid.set_crosshair = openems_set_crosshair; + openems_hid.argument_array = openems_values; openems_hid.usage = openems_usage;