Index: xy.c =================================================================== --- xy.c (revision 35878) +++ xy.c (revision 35879) @@ -189,7 +189,7 @@ /* Find the pick and place 0;0 mark, if there is any */ static void find_origin_(const char *format_name, const char *prefix, rnd_coord_t *ox, rnd_coord_t *oy) { - char tmp[128]; + char tmp[128], tmp2[128]; pcb_data_it_t it; pcb_any_obj_t *obj; char *origin_tmp = tmp; @@ -196,6 +196,7 @@ int origin_score = 0; rnd_snprintf(tmp, sizeof(tmp), "%spnp-origin-%s", prefix, format_name); + rnd_snprintf(tmp2, sizeof(tmp), "%spnp-origin", prefix); for(obj = pcb_data_first(&it, PCB->Data, PCB_OBJ_CLASS_REAL); obj != NULL; obj = pcb_data_next(&it)) { int score; @@ -202,7 +203,7 @@ if (pcb_attribute_get(&obj->Attributes, origin_tmp) != NULL) score = 2; /* first look for the format-specific attribute */ - else if (pcb_attribute_get(&obj->Attributes, "pnp-origin") != NULL) + else if (pcb_attribute_get(&obj->Attributes, tmp2) != NULL) score = 1; /* then for the generic pnp-specific attribute */ else continue;