Print the object. Create a tin opto-flag from a tin can using tin snips. Wrap the end with blue masking tape so it isn't reflective. Line it up with the printed part and mark the hole locations. Drill holes in the metal flag with an M4 drill bit or something close. Use two M4 bolts to hold the flag onto the holder (I think.. maybe they were M3?). Use an M3 bolt to fasten the holder onto the X-axis.